Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of Variance l Chapter 8 l 8.1 One way ANOVA

Similar presentations


Presentation on theme: "Analysis of Variance l Chapter 8 l 8.1 One way ANOVA"— Presentation transcript:

1 Analysis of Variance l Chapter 8 l 8.1 One way ANOVA
8.2 Multiple Comparison of Means 8.3 Two Way ANOVA (without Replication and With Replication)

2 8.0 Analysis of Variance (ANOVA)
Previous chapter – at maximum, testing hypothesis of two population means. To compare means of more than two groups or level of an independent(s) variable. ANOVA can be used to analyze the data obtained from experimental or observational studies. A factor is a variable that the experimenter has selected for investigation. A treatment is a level of a factor. Experimental units are the objects of interest in the experiment. Variation between treatment groups captures the effect of the treatment. Variation within treatment groups represents random error not explained by the experimental treatments.

3 8.1 One way ANOVA (CRD) The one-way analysis of variance specifically allows us to compare several groups of observations whether or not their population mean are equal. One way ANOVA is also known as Completely Randomized Design (CRD). The application of one way ANOVA requires that the following assumptions hold true: The populations from which the samples are drawn are (approximately) normally distributed. The populations from which the samples are drawn have the same variance. The samples drawn from different populations are random and independent. Format for data Data appear in separate columns or rows, organized by treatment groups. Sample size of each group may differ.

4 8.1 One way ANOVA (CRD) Each observation may be written as:
Or alternatively written as: Where

5 8.1 One way ANOVA (CRD) Hypothesis testing @
Where k = number of treatment groups or levels

6 P-value (Computer generated)
8.1 One way ANOVA (CRD) Hypothesis testing (cont.) The computations CRD problem in SPSS will be summarized in tabular form as shown in table below. This table is known as ANOVA table. Example Sum of Squares df Mean Square F Sig. Between Groups SSTR Within Groups SSE Total SST Treatment P-value (Computer generated) Error k-1/N-k SSTR k-1 SSE N-k SST N-1 MST/MSE N-k/N-1

7 Reject H0 if p-value < α
8.1 One way ANOVA (CRD) Hypothesis testing (cont.) Conclusion Reject H0 if p-value < α

8 8.1 One way ANOVA (CRD) Example (Example1WA.sav)
An economist wished to compare household expenditure on electricity and gas in four major cities in Australia. She obtained random samples of 25 two-person households from each city (Adelaide, Hobart, Melbourne, and Perth) and asked them to keep records of their energy expenditure over a six-month period. Test at α=0.05.

9 2 3 1 8.1 One way ANOVA (CRD) Analysis in SPSS
Move “city” into factor and “cost” into “Dependent list”. Next, click “Option” 1 Click “Descriptive” and “Homogeneity of variance test” check box. Continue and ok

10 Output 8.1 One way ANOVA (CRD) Analysis in SPSS (Cont.)
Important values to draw conclusion Output

11 8.1 One way ANOVA (CRD) Example (Example1WA.sav – solution)
1. State the null hypothesis, and alternative hypothesis, @ 2. Compare a P-value (generated by SPSS) with the given value of α. However, variance equality need to be checked first through Levene’s test ( 2nd assumption - Homogeneity of variance).

12 8.1 One way ANOVA (CRD) Example (Example1WA.sav – solution)
3. Make an initial decision (whether to reject or not to reject ) Reject 4. Make the statistical decision and state the managerial conclusion. Hence, it can be concluded that one of the mean household expenditure on electricity and gas for the four cities is difference. @ Hence, it can be concluded that there is an effect for household expenditure on electricity and gas among the four different cities.

13 8.1 One way ANOVA (CRD) Extra Exercise (Exercise1WA.sav – solution)
A biologist wishes to examine the nutrient value of six different food supplements. One hundred and fifty-four rats of the same species were each randomly assigned to one of six groups. Each group had a different supplement added to its food, and the rats’ weight gain over the ensuing six months was recorded in grams. Test the underlying assumptions of ANOVA Determine whether there are significant differences in weight gain across the food supplement.

14 8.2 Multiple Comparison of Means
Is there any differences? ANOVA Household expenditure on electricity and gas in Adelaide Household expenditure on electricity and gas in Hobart Household expenditure on electricity and gas in Perth Household expenditure on electricity and gas in Melbourne YES, THERE IS So, there really is a difference. But where actually the difference lies This is where you use post-hoc test

15 8.2 Multiple Comparison of Means
A significant F-ratio indicates that the population means are probability not equal. Because the null hypothesis is rejected if any pair of means is unequal, where the significant differences lie needs to be work out. This requires an analysis of multiple comparison of means or specifically, post-hoc multiple comparison analysis. Post-hoc analysis involves hunting through the data for any significance by doing an entire set of comparison. Several post-hoc tests are available, but for this chapter, we are going to illustrates Tukey’s HSD post-hoc test using the same data set (Example1WA.sav). As for our previous analysis of CRD, having obtained a significant result, using Tukey’s HSD test you can go further and determine where the significance lies: i.e: Which cities is there actually a significant difference in energy costs?

16 8.2 Multiple Comparison of Means
Analysis in SPSS Click “Post Hoc” 2 1 3 Click on the check box for “Tukey”. Continue and ok

17 8.2 Multiple Comparison of Means
Analysis in SPSS (Cont.) Based on the table above, it can be concluded that Adelaide and Perth have a significantly different mean energy costs. Output Important values to draw conclusion

18 8.2 Multiple Comparison of Means
Exercise By using the data of Exercise1WA.sav, if there is significant differences in weight gain across the food supplement. Locate the source of these differences using Tukey’s HSD post-hoc test.

19 8.3 Two way ANOVA The two way ANOVA operates in the same manner as the one way ANOVA except that an additional independent variable involve. Each independent variable may possess two or more levels and each participant performs in all conditions. In this subchapter, we are going to focus on two way ANOVA with replication or also known as Factorial Experiment (FE). It has the same assumption as CRD (except homogeneity of variance) : The purpose of Factorial Experiment is to examine: The effect of factor A on the dependent variable, y. The effect of factor B on the dependent variable, y along with The effects of the interactions between different levels of the factors on the dependent variable, y. Interaction exists when the effect of a level for one factor depends on which level of the other factor is present. Advantages of FE over testing one factor at a time (CRD) – more efficient & allow interactions to be detected.

20 8.3 Two way ANOVA (FE) The effect model for a FE can be written as:

21 8.3 Two way ANOVA (FE) There are three sets of hypothesis:
Factor A effect Factor B effect: Interaction effect:

22 8.3 Two way ANOVA (FE) The computations of FE problem using manual calculation was summarized in tabular form as shown in table below. However, the table format generated by SPSS will be a little bit different

23 8.3 Two way ANOVA (FE) The table of FE generated by SPSS will be as follows: SSE is unavailable Focus only on the highlighted area. SSA a - 1 SSA / a - 1 SSB b - 1 SSB / b - 1 SSAB (a – 1)(b-1) SSAB / (a – 1)(b-1)

24 8.3 Two way ANOVA (FE) At a toy company, ToyRthem, manager productivity is reflected in sales of toys across various store types and locations. Each managers oversees six stores: one of each type in each location. You wish to determine the effect of store type (variety, department and discount) and location (city centre or suburbs) on productivity, measured as sales of toys. You wish to asked three questions: Does the store type influence the amount of toy sales? Does the store location influence the amount of toy sales? Does the influence of store type on the amount of toy sales depend on the location of the store?

25 8.3 Two way ANOVA (FE) Analysis in SPSS 2 3 1

26 8.3 Two way ANOVA (FE) Analysis in SPSS Output

27 8.3 Two way ANOVA (FE) Hypotheses testing: Location effect
Compare a P-value (generated by SPSS) with the given value of α

28 8.3 Two way ANOVA (FE) Hypotheses testing: Store type effect
Compare a P-value (generated by SPSS) with the given value of α

29 8.3 Two way ANOVA (FE) Hypotheses testing: Interaction effect
Compare a P-value (generated by SPSS) with the given value of α

30 8.3 Two way ANOVA (FE) Extra exercise
A graphic designer wishes to determine which combination of colours and backgrounds produces the most aesthetically pleasing display. Five participants are exposed to two different types of background (hatched and spotted) and lettering of four different colours (red, blue, green and yellow). Participants are asked to rate the pleasing nature of these display on a 20-point scale (from 1 = least pleasing to 20 = most pleasing). Given the data in Exercise2WA.sav, your task are to: Determine whether the background influences the participants’ ratings. Determine whether the colour of the lettering influences the participants’ ratings. Determine whether the influence of the background on ratings depends on letter colouring.


Download ppt "Analysis of Variance l Chapter 8 l 8.1 One way ANOVA"

Similar presentations


Ads by Google