Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of Variance ( ANOVA )

Similar presentations


Presentation on theme: "Analysis of Variance ( ANOVA )"— Presentation transcript:

1 Analysis of Variance ( ANOVA )
Chapter 15 Analysis of Variance ( ANOVA )

2 Analysis of Variance… Analysis of variance is a technique that allows us to compare two or more populations of interval data. Analysis of variance is:  an extremely powerful and widely used procedure.  a procedure which determines whether differences exist between population means.  a procedure which works by analyzing sample variance.

3 One-Way Analysis of Variance…
Independent samples are drawn from k populations: Note: These populations are referred to as treatments. It is not a requirement that n1 = n2 = … = nk.

4 Table 15.01 Notation for the One-Way Analysis of Variance

5 Notation Independent samples are drawn from k populations (treatments). 1 2 k First observation, first sample X11 x21 . Xn1,1 X12 x22 . Xn2,2 X1k x2k . Xnk,k Second observation, second sample Sample size Sample mean X is the “response variable”. The variables’ value are called “responses”.

6 One Way Analysis of Variance…
New Terminology: x is the response variable, and its values are responses. xij refers to the i th observation in the j th sample. E.g. x35 is the third observation of the fifth sample. nj ∑ xij xj = mean of the jth sample = nj i=1 nj = number of observations in the sample taken from the jth population

7 One Way Analysis of Variance…
= The grand mean, , is the mean of all the observations, i.e.: (n = n1 + n2 + … + nk) and k is the number of populations x k nj ∑ ∑ xij x = n = j = 1 i = 1

8 One Way Analysis of Variance…
More New Terminology: Population classification criterion is called a factor. Each population is a factor level.

9 Example 15-1… An apple juice company has a new product featuring…
more convenience, similar or better quality, and lower price when compared with existing juice products. Which factor should an advertising campaign focus on? Before going national, test markets are set-up in three cities, each with its own campaign, and data is recorded… Do differences in sales exist between the test markets?

10 City City City3 (Convenience) (Quality) (Price) 529.00 658.00 793.00 514.00 663.00 719.00 711.00 606.00 461.00 498.00 604.00 495.00 485.00 557.00 353.00 542.00 614.00 804.00 630.00 774.00 717.00 679.00 604.00 620.00 697.00 706.00 615.00 492.00 719.00 787.00 699.00 572.00 523.00 584.00 634.00 580.00 624.00 672.00 531.00 443.00 596.00 602.00 502.00 659.00 689.00 675.00 512.00 691.00 733.00 698.00 776.00 561.00 572.00 469.00 581.00 679.00 532.00 Data Xm15-01

11 comma added for clarity
Example 15.1… Terminology x is the response variable, and its values are responses. weekly sales is the response variable; the actual sales figures are the responses in this example. xij refers to the ith observation in the jth sample. E.g. x42 is the fourth week’s sales in city #2: 717 pkgs. x20, 3 is the last week of sales for city #3: 532 pkgs. comma added for clarity

12 Example 15.1… Terminology . The response variable is weekly sales
Population classification criterion is called a factor. The advertising strategy is the factor we’re interested in. This is the only factor under consideration (hence the term “one way” analysis of variance). Each population is a factor level. In this example, there are three factor levels: convenience, quality, and price.

13 Terminology In the context of this problem…
Response variable – weekly sales Responses – actual sale values Experimental unit – weeks in the three cities when we record sales figures. Factor – the criterion by which we classify the populations (the treatments). In this problem the factor is the marketing strategy. Factor levels – the population (treatment) names. In this problem factor levels are the marketing strategies.

14 Example 15.1… The null hypothesis in this case is: H0: μ1= μ2 =μ3
IDENTIFY The null hypothesis in this case is: H0: μ1= μ2 =μ3 i.e. there are no differences between population means. Our alternative hypothesis becomes: H1: at least two means differ OK. Now we need some test statistics…

15 The rationale of the test statistic
Two types of variability are employed when testing for the equality of the population means

16 Graphical demonstration:
Employing two types of variability

17 A small variability within the samples makes it easier
20 25 30 1 7 Treatment 1 Treatment 2 Treatment 3 10 12 19 9 20 16 15 14 11 10 9 A small variability within the samples makes it easier to draw a conclusion about the population means. 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. Treatment 1 Treatment 2 Treatment 3

18 The rationale behind the test statistic – I
If the null hypothesis is true, we would expect all the sample means to be close to one another (and as a result, close to the grand mean). If the alternative hypothesis is true, at least some of the sample means would differ. Thus, we measure variability between sample means.

19 Variability between sample means
The variability between the sample means is measured as the sum of squared distances between each mean and the grand mean. This sum is called the Sum of Squares for Treatments SST In our example treatments are represented by the different advertising strategies.

20 Sum of squares for treatments (SST)
There are k treatments The mean of sample j The size of sample j Note: When the sample means are close to one another, their distance from the grand mean is small, leading to a small SST. Thus, large SST indicates large variation between sample means, which supports H1.

21 Test Statistics… Since μ1= μ2 =μ3 is of interest to us, a statistic that measures the proximity of the sample means to each other would also be of interest. Such a statistic exists, and is called the between-treatments variation. It is denoted SST, short for “sum of squares for treatments”. Its is calculated as: grand mean sum across k treatments A large SST indicates large variation between sample means which supports H1.

22 Example 15.1… COMPUTE Since: If it were the case that:
then SST = 0 and our null hypothesis, H0: would be supported. More generally, a “small value” of SST supports the null hypothesis. The question is, how small is “small enough”?

23 Example 15.1… COMPUTE The following sample statistics and grand mean were computed… Hence, the between-treatments variation, sum of squares for treatments, is: is SST = 57, “large enough” to indicate the population means differ?

24 The rationale behind test statistic – II
Large variability within the samples weakens the “ability” of the sample means to represent their corresponding population means. Therefore, even though sample means may markedly differ from one another, SST must be judged relative to the “within samples variability”.

25 Sum of Squares for Error
Within samples variability The variability within samples is measured by adding all the squared distances between observations and their sample means. This sum is called the Sum of Squares for Error 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).

26 Test Statistics… SST gave us the between-treatments variation. A second statistic, SSE (Sum of Squares for Error) measures the within-treatments variation. SSE is given by: or: In the second formulation, it is easier to see that it provides a measure of the amount of variation we can expect from the random variable we’ve observed.

27 Example 15.1… We calculate the sample variances as:
COMPUTE We calculate the sample variances as: 3 and from these, calculate the within-treatments variation (sum of squares for error) as:

28 Sum of squares for errors (SSE)
Is SST = 57, large enough relative to SSE = 506, to reject the null hypothesis that specifies that all the means are equal? We still need a couple more quantities in order to relate SST and SSE together in a meaningful way…

29 Mean Squares… ν1 = 3 – 1 = 2 ; ν2 = 60 – 3 = 57
The mean square for treatments (MST) is given by: is F-distributed with k–1 and n–k degrees of freedom. The mean square for errors (MSE) is given by: And the test statistic: ν1 = 3 – 1 = 2 ; ν2 = 60 – 3 = 57

30 Example 15.1… COMPUTE We can calculate the mean squares treatment and mean squares error quantities as:

31 Note these required conditions:
Example 15.1… COMPUTE Giving us our F-statistic of: Does F = 3.23 fall into a rejection region or not? How does it compare to a critical value of F? Note these required conditions: 1. The populations tested are normally distributed. 2. The variances of all the populations tested are equal.

32 Example 15.1… INTERPRET Since the purpose of calculating the F-statistic is to determine whether the value of SST is large enough to reject the null hypothesis, if SST is large, F will be large. Hence our rejection region is: Our value for FCritical is:

33 Example 15.1… INTERPRET Since F = 3.23 is greater than FCritical = 3.15, we reject the null hypothesis (H0: μ1= μ2 =μ3 ) in favor of the alternative hypothesis (H1: at least two population means differ). That is: there is enough evidence to infer that the mean weekly sales differ between the three cities. Stated another way: we are quite confident that the strategy used to advertise the product will produce different sales figures.

34

35 Summary of Techniques (so far)…

36 ANOVA Table… The results of analysis of variance are usually reported in an ANOVA table… Source of Variation degrees of freedom Sum of Squares Mean Square Treatments k–1 SST MST=SST/(k–1) Error n–k SSE MSE=SSE/(n–k) Total n–1 SS(Total) F-stat=MST/MSE

37 Table 15.2 ANOVA Table for the One-Way Analysis of Variance

38 Table 15.3 ANOVA Table for Example 15.1

39 SPSS Output

40 Can We Use t – Test Instead of ANOVA?
We can’t for two reasons We need to perform more calculations. If we have six pairs then we will have to test C6 = ( 6 x 5 ) / 2 = 15 times It will increase the probability of making Type I error from 5% to 54% 2

41 Relationship Between t and F Statistics
The F statistic is approximately equal to the square of t F = t2 Hence we will draw exactly the same conclusion using analysis of variance as we did when we applied t test of u1 – u2.

42 Identifying Factors… Factors that Identify the One-Way Analysis of Variance:

43 Analysis of Variance Experimental Designs
Experimental design is one of the factors that determines which technique we use. In the previous example we compared three populations on the basis of one factor – advertising strategy. One-way analysis of variance is only one of many different experimental designs of the analysis of variance.

44 Analysis of Variance Experimental Designs
A multifactor experiment is one where there are two or more factors that define the treatments. For example, if instead of just varying the advertising strategy for our new apple juice product if we also vary the advertising medium (e.g. television or newspaper), then we have a two-factor analysis of variance situation. The first factor, advertising strategy, still has three levels (convenience, quality, and price) while the second factor, advertising medium, has two levels (TV or print).

45 One - way ANOVA Single factor Two - way ANOVA Two factors
Response Response Treatment 3 (level 1) Treatment 2 (level 2) Treatment 1 (level 3) Level 3 Level2 Factor A Level 1 Level2 Level 1 Factor B


Download ppt "Analysis of Variance ( ANOVA )"

Similar presentations


Ads by Google