# ANOVA

# Introduction to Anova

*ANOVA *stands for analysis of variance. It is a collection of statistical models and their associated estimation processes used to analyze differences among group means in a sample.

People usually get confused regarding the working of ANOVA as it says “Analysis of variance” but in simple terms, ANOVA is used to compare the differences in means in more than 2 groups and it does this by looking at the variation in data and where the variation is found.

It helps us identify which of the experiment or surveys are more significant or in other words it tells us whether to reject the null hypothesis or accept the alternate hypothesis.

** Eg**:

- A manufacturer has two different processes for leather shoes. He wants to know if one process is better than the other.
- A group of cancer patients is trying three different therapies: chemotherapy, medication, and foreign medicine. They want to see if one therapy is better than the others.

# Assumptions

- Each group sample is drawn from a population that is normally distributed.
- The variance among the population is the same i.e. homoscedasticity.
- The distribution of the residuals is normal.
- The sample cases should be independent of each other.

Types Of Anova Tests

**One-Way ANOVA**: One-way ANOVA is used when the test has just one independent variable.

*Eg: Comparison of the difference in IQ levels by country*

2**. Two-Way ANOVA**: Two-way ANOVA is used when the test has 2 independent variables.

*Eg: Comparison of IQ levels by country and Gender*

3**. N-Way ANOVA**: This type of test is used when the test has multiple independent variables. *Eg: Comparison of IQ levels by country, age, gender, qualification, etc.*

# General Steps In Anova

- The null hypothesis for ANOVA is that there is no significant difference between the groups and the alternate hypothesis states that there is at least one significant difference between the groups.
- Import and clean the data
- Do the f test and find out the p-value
- If the p-value is less than 0.05 then the null hypothesis is rejected else its accepted.
- The Post hoc test tells us which groups are different from each other.