# ANOVA

Buying a new product or testing a new technique but not sure how it stacks up against the alternatives? It’s an all too familiar situation for most of us. Most of the options sound similar to each other so picking the best out of the lot is a challenge.

In order to make a confident and reliable decision, we will need evidence to support our approach. This is where the concept of ANOVA comes into play.

ANOVA, which stands for Analysis of Variance.

An **ANOVA **test is a way to find out if survey or experiment results are significant. You’re** testing groups to see if there’s a difference between them and **analyze the difference between the means of more than two groups.

**Examples** of when you might want to test different groups:

- A group of psychiatric patients is trying three different therapies: counseling, medication, and biofeedback. You want to see if one therapy is better than the others.
- A manufacturer has two different processes to make light bulbs. They want to know if one process is better than the other.
- Students from different colleges take the same exam. You want to see if one college outperforms the other.

A one-way ANOVA uses one independent variable, while a two-way ANOVA uses two independent variables.

**Types of ANOVA**

**1. One-way ANOVA:**

A one-way ANOVA is used to compare two means from two independent (unrelated) groups using the F-distribution. The null hypothesis for the test is that the two means are equal.

Therefore, a significant result means that the two means are unequal.

**Examples of when to use a one way ANOVA**

**Situation 1:** You have a group of individuals randomly split into smaller groups and completing different tasks. For example, you might be studying the effects of tea on weight loss and form three groups: green tea, black tea, and no tea.

**Situation 2:** Similar to situation 1, but in this case, the individuals are split into groups based on an attribute they possess. For example, you might be studying the leg strength of people according to weight. You could split participants into weight categories (obese, overweight, and normal) and measure their leg strength on a weight machine.

### 2.**Two-way ANOVA:**

A Two Way ANOVA is an extension of the One Way ANOVA. With a One Way, you have one independent variable affecting a dependent variable. With a Two Way ANOVA, there are two independents. Use a two-way ANOVA when you have one measurement variable (i.e. a quantitative variable) and two nominal variables. In other words, if your experiment has a quantitative outcome and you have two categorical explanatory variables, a two-way ANOVA is appropriate.

**For example**, you might want to find out if there is an interaction between income and gender for anxiety level at job interviews. The anxiety level is the outcome or the variable that can be measured. Gender and Income are the two categorical variables. These categorical variables are also the independent variables, which are called factors in a Two Way ANOVA.

**Step-wise :**

Three composition instructors recorded the number of spelling errors which their students made on a research paper. At 1% level of significance test whether there is a significant difference in the average number of errors in the three classes of students.

**Solution:**

**Step 1: Hypothesis**

**Null Hypothesis: ** *H*_{0}: *µ*_{1} = *µ*_{2} = *µ*_{3}

That is there is no significant difference among the mean number of errors in the three classes of students.

**Alternative Hypothesis**: *H*_{1}* *:* μ _{i} ≠ μ_{j} *for at one pair (

*i, j*);

*i,j*= 1,2,3;

*i ≠ j*

That is, at least one pair of groups differ significantly on the mean number of errors.

**Step 2: Data**

**Step 3 : Level of significance** : *α* = 5%

**Step 4 : Test Statistic ***F*_{0}* = MST / MSE*

**Step 5 : Calculation of Test statistic**

**Individual square**

**ANOVA Table **

**Step 6 : Critical value**

The critical value =** f**** _{(15, 2),0.05}** = 3.6823.

**Step 7: Decision**

As *F*_{0}** = 0.710 < ***f*_{(15, 2),0.05}** =** 3.6823, null hypothesis is not rejected. There is not enough evidence -to reject the null hypothesis and hence we conclude that the mean number of errors made by these three classes of students are not equal.

**Too much technical jargon, right. Don’t worry!!** You can go through the following links to know more about the statistic terminologies and formulae used above: