MulaiMulai sekarang secara 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!

Latihan ini adalah bagian dari kursus

Practicing Statistics Interview Questions in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

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

# Check the homogeneity of variance
___(___ ~ group, data = ___)
Edit dan Jalankan Kode