LoslegenKostenlos loslegen

ANOVA for plant growth

In this exercise, you will perform a one-way ANOVA to compare means across three groups.

Such a task might pop up during the interviews for various sectors, including engineering, marketing, and medical services.

Recall that the assumptions of ANOVA are:

  • Independence of cases
  • Normal distributions
  • Homogeneity (equality) of variances

You can check the two last assumptions with the Shapiro-Wilk test and Bartlett's test respectively.

The null hypothesis of a one-way ANOVA states that the means across groups are equal. $$ H_0: \mu_1 = \mu_2 = … = \mu_n $$

Use oneway.test() to perform ANOVA in this exercise.

Watch out! So far, we've used tapply() to compute descriptive statistics across groups. We can use this function to perform statistical tests across groups, too!

Diese Übung ist Teil des Kurses

Practicing Statistics Interview Questions in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Test normality across groups
tapply(___, PlantGrowth$group, FUN = ___)

# Check the homogeneity of variance
___(___ ~ group, data = ___)
Code bearbeiten und ausführen