**ANOVA (Analysis of Variance)** **Tutorial**

1. When do we use **ANOVA** (Analysis of Variance)?

If there are **three or more** groups to compare, what method should be used? In this case, **ANOVA** (Analysis of Variance) should be used. At this point, we use the **mean **and** variance** of each group. This is because the larger the variance, the farther apart the mean of the groups, the different the means between the groups. This method can be used to measure statistically significant differences between groups.

2. Find the “Statistics” section under the black banner at the top and click “ANOVA test”.

3. Choose either your own file or sample to run the ANOVA test.

4. If you are done selecting your data file, press the “Select” button.

5. Here we have three steps to run the ANOVA test successfully. First, select your Dependent Variable (Y). Here, you can just choose the category (means) that you want to compare among three or more independent groups (X). Please be aware that you have to choose the continuous variable here. For the “SFO 2018” example, you can choose overall satisfaction to compare the means.

6. Then, choose the Independent Variable (X). Here, you have to choose the grouping variable that categorizes the groups. Be aware that this variable is a categorical variable. For the “SFO 2018” example, you can choose “**age**” that distinguishes the types of airline companies.

7. Click the “Run” button.

8. Check the result. Since the p-value, 0.001, is much smaller than 0.01 (), we reject the null hypothesis (). The null hypothesis indicates that means of overall satisfaction of each airline company are indifferent(same) across the ethnicity. Therefore, it tells that means of overall satisfaction in each airline are different from each other.

9. Check the Mean plots. We can easily see that all the means of overall satisfaction in every age group are not the same.

10. When you click the “Advanced” section which is under the “Result”, you can easily see the ANOVA table and the descriptive.

11. If you go to the “Post-hoc pairwise comparison” section, you can check which independent variables are different in detail. The ANOVA test shows whether there exists difference among groups but can’t tell which groups are different from each other. The Post-hoc pairwise comparison can tell which sub groups are different from each other. Here’s the example below. We can see that “25-34” and “18-24” age groups are significantly different each other as the “sig” (p-value) is less than 0.05 and its sig column has two stars.

## Post-hoc Tukey description

There is a multiple comparison method designed to compare the means of all two levels at the same time while maintaining the significance level at a set size. Tukey's HSD (honestly significant difference) test Is one of them.

Tukey's HSD(honestly significant difference) test is using the studentized range distribution in order to test whether there is a difference between the means between the two groups. A feature of Tukey is that it is available when the number of samples being compared is the same. Analysis is possible for all collective combinations. However, the disadvantage is that the smaller the number of samples, the lower the accuracy.

ANOVA MANOVA ANCOVA Description and Difference

What is ANOVA?

ANOVA testing is simply a statistical analysis method that compares whether three or more groups are the same or not. In other words, if the ANOVA analysis results in statistically significant results, it can be derived up to the fact that there are differences among groups, but there are limitations in telling which groups are different. For this reason, post-hoc analysis is conducted to further examine which of the total groups are different.

ANOVA

The core component of all four of these analyses (ANOVA, ANCOVA, MANOVA, AND MANCOVA) is the first in the list, the ANOVA. An "Analysis of Variance" (ANOVA) tests three or more groups for mean differences based on a continuous (i.e. scale or interval) response variable (a.k.a. dependent variable). The term "factor" refers to the variable that distinguishes this group membership. Race, level of education, and treatment condition are examples of factors.

There are two main types of ANOVA: (1) "one-way" ANOVA compares levels (i.e. groups) of a single factor based on single continuous response variable (e.g. comparing test score by 'level of education') and (2) a "two-way" ANOVA compares levels of two or more factors for mean differences on a single continuous response variable (e.g. comparing test score by both 'level of education' and 'zodiac sign'). In practice, you will see one-way ANOVAs more often and when the term ANOVA is generically used, it often refers to a one-way ANOVA.

### ANCOVA

The obvious difference between ANOVA and ANCOVA is the letter "C", which stands for 'covariance'. Like ANOVA, "Analysis of Covariance" (ANCOVA) has a single continuous response variable. Unlike ANOVA, ANCOVA compares a response variable by both a factor and a continuous independent variable (e.g. comparing test score by both 'level of education' and 'number of hours spent studying'). The term for the continuous independent variable (IV) used in ANCOVA is "covariate".

ANCOVA is also commonly used to describe analyses with a single response variable, continuous IVs, and no factors. Such an analysis is also known as a regression.

A key (but not only) difference in these methods is that you get slightly different output tables. Also, regression requires that user dummy code factors, while GLM handles dummy coding through the "contrasts" option. The linear regression command in SPSS also allows for variable entry in hierarchical blocks (i.e. stages).

### MANOVA

The obvious difference between ANOVA and a "Multivariate Analysis of Variance" (MANOVA) is the “M”, which stands for multivariate. In basic terms, A MANOVA is an ANOVA with two or more continuous response variables. Like ANOVA, MANOVA has both a one-way flavor and a two-way flavor. The number of factor variables involved distinguish a one-way MANOVA from a two-way MANOVA.

When comparing two or more continuous response variables by a single factor, a one-way MANOVA is appropriate (e.g. comparing ‘test score’ and ‘annual income’ together by ‘level of education’). A two-way MANOVA also entails two or more continuous response variables, but compares them by at least two factors (e.g. comparing ‘test score’ and ‘annual income’ together by both ‘level of education’ and ‘zodiac sign’).

MANCOVA

Like ANOVA and ANCOVA, the main difference between MANOVA and MANCOVA is the “C,” which again stands for “covariance.” Both a MANOVA and MANCOVA feature two or more response variables, but the key difference between the two is the nature of the IVs. While a MANOVA can include only factors, an analysis evolves from MANOVA to MANCOVA when one or more more covariates are added to the mix.

Two way ANOVA

Difference between One Way ANOVA vs. Two Way ANOVA

One-way ANOVA is a type of statistical testing method that compares the variance of the means of groups, only considering one independent variable or factor. This is a hypothesis-based test, which means evaluating a number of mutually exclusive theories about the data that it has.

What is the hypothesis of One-way ANOVA?

There are two possible hypotheses.

* The null hypothesis (H0) is that there is no difference between groups. That is, the equality between means. In the preceding example, there is no difference in weight depending on the four different reproductive periods.

* Alternative hypothesis (H1) is, of course, that there is a difference.

- What are the assumptions in One-way ANOVA?

1. Normality - Samples should be drawn from a normally distributed population.

2. Independence between samples - each sample shall be drawn independently of the other samples.

3. Equivalence of variance - the variance of data between different groups should be the same.

4. The output variable must be continuous - i.e. the value of weight is the output variable in the example above, so remember that it is a continuous value.

**What is Two-way ANOVA?**

Similar to One-way, it is a hypothesis-based test. However, in Two-way, each sample is defined in two ways. As a result, it is placed into two category groups. Let's rethink the example of a sea elephant. Researchers ask the question this time: Do sea elephants weigh differently depending on the season and their weight is affected by the gender of sea elephants? It is embodied by the question. In this example, two input variables, season and gender, are considered. For gender, there are two categories: male and female.

Two-way ANOVA thus analyzes the effectiveness of two factors (season and gender), where the output variable will remain in weight. In other words, it analyzes whether two factors, season and gender, affect the weight of the output variable, the marine elephant.

## What are the assumptions of Two-way ANOVA?

1. Output variable - weight here, which should be a continuous value as shown above. That is, it should be measured on a scale and represented as a value such as a gram or a pre-gram.

2. Two input variables - here will be season and gender, and these must be category variables.

3. Sample independence - Each sample shall be drawn independently of the other samples. This is exactly the same as the previous assumption.

4. Distributed Equivalence - Same as One-way ANOVA

5. Regularity - Same as One-way ANOVA

** What is the hypothesis in Two-way ANOVA?**

Because Two-way ANOVA considers the effectiveness of two category factors, there are three pairs for null and alternative hypotheses, as well as for the effect between category factors. Here, we will construct null and opposition hypotheses according to the previous example.

1.

* Hypothesis: All season groups have the same mean.

* Alternative hypothesis: At least one season group has a different average.

2.

* Hypothesis: The mean of the gender group is the same.

* Alternative hypothesis: The means of gender groups are different.

3.

* Hypothesis: There is no interaction between season and gender.

* Alternative hypothesis: There is an interaction between season and gender.

## **Difference between One-way ANOVA vs. Two-way ANOVA**

1. One-way ANOVA is designed primarily to allow the equality of three or more means to be compared. Two-way ANOVA is designed to evaluate the interrelationship between two input variables for an output variable.

2. One-way ANOVA involves only one factor or independent variable, i.e. only one input variable. Two-way ANOVA, on the other hand, considers two input variables. I think this is the most sclear difference.

3. One-way ANOVA has three or more categories of one input variable. Two-way ANOVA instead compares several groups of two factors. If there are two category groups, there should be at least three categories because it would be T-test, instead of two categories for the second factor in Two-way.

4. One-way ANOVA requires only two principles. It is both replicated and random. Two-way ANOVA, on the contrary, must follow three principles. Local Control is also added in terms of replication and randomness.