ComenzarEmpieza gratis

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!

Este ejercicio forma parte del curso

Practicing Statistics Interview Questions in R

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

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

# Check the homogeneity of variance
___(___ ~ group, data = ___)
Editar y ejecutar código