Statistics IIUnit 313 min read
ANOVA & Experimental Design: Models, Tests, and Applications
Unit 3 of Statistics II covers Analysis of Variance (ANOVA)—its principles, assumptions, and applications in comparing means across groups—and experimental design (CRD, RBD, LSD, Factorial) to control variability and draw valid inferences. Includes worked examples, ANOVA tables, and hypothesis testing.
Core Concepts
1. Introduction to ANOVA
ANOVA (Analysis of Variance) is a statistical technique used to compare means of three or more groups to determine if at least one group differs significantly from the others. It partitions total variability into:
- Between-group variability (due to treatment effects)
- Within-group variability (due to random error)
Key Idea: If between-group variability is significantly larger than within-group variability, we reject the null hypothesis ().
Assumptions of ANOVA
| Assumption | Explanation | How to Check |
|---|---|---|
| Normality | Residuals in each group should be normally distributed. | Shapiro-Wilk test, Q-Q plots. |
| Homogeneity of Variance | Variances across groups should be equal. | Levene’s test, Bartlett’s test. |
| Independence | Observations should be independent (no repeated measures). | Experimental design (randomization). |
| Random Sampling | Samples should be randomly selected from populations. | Proper sampling methodology. |
Mathematical Model
For a one-way ANOVA with groups:
- : observation in group.
- : Grand mean.
- : Effect of treatment ().
- : Random error ().
2. One-Way ANOVA (Completely Randomized Design - CRD)
Used when:
- One factor is studied at multiple levels.
- Subjects are randomly assigned to treatments.
ANOVA Table for One-Way CRD
| Source of Variation | Degrees of Freedom (df) | Sum of Squares (SS) | Mean Square (MS) | F-statistic |
|---|---|---|---|---|
| Between Groups | ||||
| Within Groups | ||||
| Total |
Decision Rule:
- If , reject (significant difference exists).
- Use post-hoc tests (Tukey’s HSD, Bonferroni) to identify which groups differ.
Worked Example
A study tests the effect of three fertilizers (A, B, C) on crop yield (kg/plot). Data:
| Fertilizer | Yields (kg) |
|---|---|
| A | 20, 22, 19, 21 |
| B | 18, 17, 20, 19 |
| C | 25, 24, 26, 23 |
Steps:
- Calculate group means (, , ).
- Compute , , and .
- Fill the ANOVA table and compute .
- Compare with critical value ().
ANOVA Table:
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Between | 2 | 100.5 | 50.25 | 12.06* |
| Within | 9 | 37.5 | 4.17 | |
| Total | 11 | 138 |
Conclusion: → Reject . Fertilizer C significantly increases yield.
3. Two-Way ANOVA (Randomized Block Design - RBD)
Used when:
- Two factors are studied (e.g., fertilizer type and soil type).
- Blocking reduces variability (e.g., pairing similar subjects).
Mathematical Model
- : Effect of treatment.
- : Effect of block.
- : Interaction effect.
ANOVA Table for Two-Way RBD
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Between Treatments | ||||
| Between Blocks | ||||
| Interaction (A×B) | ||||
| Error | ||||
| Total |
Example: Testing two fertilizers (A, B) across three soil types (1, 2, 3) with 2 replications.
4. Latin Square Design (LSD)
Used when:
- Two blocking factors (e.g., rows and columns in agricultural plots).
- One treatment factor is applied in a way that balances both blocks.
Conditions for LSD
- treatments, rows, columns.
- Each treatment appears once in each row and column.
- No interaction between rows and columns (or interaction is negligible).
ANOVA Table for LSD
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Rows | ||||
| Columns | ||||
| Treatments | ||||
| Error | ||||
| Total |
Example: Testing 4 pesticides (A, B, C, D) in a grid where rows = soil types, columns = time periods.
5. Factorial Design (Two-Factor ANOVA with Interaction)
Used when:
- Two or more factors are studied simultaneously.
- Interaction effects are of interest (e.g., does fertilizer A work better with soil type X?).
ANOVA Table for Factorial Design
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Factor A | ||||
| Factor B | ||||
| A × B Interaction | ||||
| Error | ||||
| Total |
Example: Study on study time (2 levels: short, long) and coffee intake (2 levels: yes, no) on exam scores.
6. Experimental Designs: Comparison Table
| Design | Use Case | Advantages | Disadvantages | Key Test |
|---|---|---|---|---|
| CRD (One-Way ANOVA) | Single factor with multiple levels. | Simple, no blocking needed. | Ignores other sources of variability. | One-way ANOVA |
| RBD (Two-Way ANOVA) | Two factors (one blocking variable). | Reduces error by blocking. | Requires homogeneous blocks. | Two-way ANOVA |
| LSD | Two blocking factors + one treatment. | Controls two sources of variability. | Limited to designs. | LSD ANOVA |
| Factorial | Multiple factors + interaction effects. | Detects interaction effects. | Complex analysis. | Factorial ANOVA |
7. Post-Hoc Tests
If ANOVA is significant, use:
- Tukey’s HSD: Compares all pairs of means (honest significant difference).
- Bonferroni: Adjusts alpha level for multiple comparisons.
- Scheffé’s: Conservative for complex comparisons.
Formula for Tukey’s HSD:
- : Studentized range statistic.
- : Sample size per group.
8. Applications of ANOVA
- Agriculture: Comparing fertilizer effects on crop yield.
- Medicine: Testing drug dosages on patient recovery times.
- Education: Evaluating teaching methods on student test scores.
- Industry: Optimizing machine settings for product quality.
Exam Tip
What Examiners Look For
Correct ANOVA Table Setup:
- Ensure degrees of freedom are calculated properly (e.g., , ).
- Label all sources (Between, Within, Total).
Assumption Checks:
- Mention normality (Shapiro-Wilk) and homogeneity (Levene’s test) in theory.
- In exams, if data is given, state whether assumptions hold (even if not tested).
Interpretation:
- If is significant, say "There is sufficient evidence to reject " (not "proved").
- For post-hoc tests, specify which groups differ (e.g., "Group C differs from A and B").
Design Selection:
- Choose the right design (CRD, RBD, LSD) based on the scenario.
- Justify blocking (e.g., "To control for soil variability").
Common Pitfalls:
- Ignoring interaction: In factorial designs, always test .
- Violating assumptions: Non-normal data may require Kruskal-Wallis (non-parametric alternative).
- Incorrect df: , not .
Sample Exam Questions & How to Approach
| Question Type | Key Steps |
|---|---|
| Complete ANOVA table | Calculate SS, MS, F manually. Use formulas: . |
| Interpret F-test results | State null/alternative hypotheses, compare to critical value. |
| Design selection | Identify factors/blocks. Choose CRD if one factor, RBD if blocking needed. |
| Post-hoc analysis | After significant ANOVA, apply Tukey’s HSD to find specific differences. |
| Assumption violations | If data is skewed, suggest Kruskal-Wallis or transformations. |
Quick Revision Checklist
- Can you write the ANOVA table for one-way, two-way, and LSD?
- Do you know when to use Tukey’s vs. Bonferroni?
- Can you explain interaction effects in factorial designs?
- Are you familiar with non-parametric alternatives (Kruskal-Wallis, Friedman)?
- Can you justify why blocking is used in RBD/LSD?
Practice Problems
Given data: Three diets (A, B, C) with weight loss (kg):
- A: 5, 6, 4
- B: 8, 7, 9
- C: 3, 2, 1 Task: Perform one-way ANOVA and interpret results.
Scenario: A factory tests two machines (X, Y) across three shifts (Day, Night, Graveyard). Task: Which design (RBD, LSD, Factorial) is appropriate? Why?
ANOVA Table:
Source df SS MS F Between 2 45 ? 5.6 Within 12 30 ? Total 14 75 Task: Complete the table and state your conclusion at .
Non-Parametric Alternatives
If ANOVA assumptions fail, use:
| Parametric Test | Non-Parametric Alternative |
|---|---|
| One-way ANOVA | Kruskal-Wallis test |
| Two-way ANOVA | Friedman test |
| Paired t-test | Wilcoxon signed-rank test |
When to Use:
- Small sample sizes ().
- Non-normal data.
- Ordinal data.
Final Notes
- Always state assumptions before running ANOVA.
- Visualize data: Boxplots help check homogeneity of variance.
- Software: Use R (
aov()), Python (stats.f_oneway()), or SPSS for computations. - Real-world link: ANOVA is used in A/B testing, clinical trials, and quality control.
References for Further Reading
- Montgomery, D.C. Design and Analysis of Experiments.
- Neter, J., Kutner, M.H., Nachtsheim, C.J. Applied Linear Statistical Models.
- TU Syllabus: Statistics II (Unit 3 notes).
- Online: Stat Trek ANOVA Guide, R Documentation for
aov.
End of Note
Based on the TU BSc CSIT syllabus for Statistics II (STA215), unit 3.
Discussion
Loading…