Analysis of Variance (ANOVA) (original) (raw)

Last Updated : 23 Jul, 2025

**Analysis of Variance (ANOVA) is a statistical technique used to determine if there are significant differences between the average values (means) of **two or more independent groups. It works by examining the spread of data within each group compared to the spread between the groups, helping researchers understand if observed differences are likely real or just due to random chance. It is widely used in research, including medicine, to compare treatments, interventions, or conditions.

programing_5

ANNOVA VISUALISATION

**Problem Statement: Medical Example

Suppose a doctor wants to test the effectiveness of a new headache medication at three different dosages: 10 mg, 20 mg, and 30 mg. Patients rate their headache relief on a scale of 1 to 10 (1 = no relief, 10 = complete relief). The goal is to determine if the mean relief scores differ significantly between the three dosage groups.

anova_

ANOVA

The formula of ANOVA revolves around calculating an **F-statistic (or F-ratio). This F-statistic is essentially a ratio that compares the variability **between your groups to the variability **within your groups.

programing_6

ANNOVA FORMULA

**Assumptions of ANOVA

ANOVA relies on several key assumptions to ensure valid results:

**Types of ANOVA

**One-Way ANOVA

**Two-Way ANOVA

**ANOVA Explained with the Medical Example

**Sample Data Table

Patient 10 mg 20 mg 30 mg
1 4 6 8
2 5 7 7
3 3 5 9
4 4 6 8
5 4 7 8

**Group means:

**Step-by-Step ANOVA Calculation

**1. Calculate Sum of Squares

**2. Degrees of Freedom

**3. Mean Squares

**4. F-Statistic

F-statistic = \frac{MSB}{MSW} = \frac{20.06}{0.57} = 35

**5. ANOVA Table

Source SS df MS F
Between 40.12 2 20.06 35.19
Within 6.8 12 0.57
Total 46.92 14

**6. F-Distribution and Significance

**One-Way vs Two-Way ANOVA

Feature One-Way ANOVA Two-Way ANOVA
Factors (IVs) 1 (e.g., dosage) 2 (e.g., dosage, gender)
Interaction Tested No Yes
Example Dosage only Dosage and gender
Main Purpose Group mean differences Main and interaction effects

**Applications of ANOVA

**Advantages of ANOVA