LoslegenKostenlos loslegen

One sided vs. Two-sided tests

Recall in the first exercise that we tested to see if the mean of the guinea pigs' teeth in ToothGrowth was not equal to 18 micrometers. That was an example of a two-sided t-test: we wanted to see if the mean of len is some other number on either side of 18.

We can also conduct a one-sided t-test, explicitly checking to see if the mean is less than or greater than 18. Whether to use a one- or two-sided test usually follows from your research question. Does an intervention cause longer tooth growth? One-sided, greater than. Does a drug cause the test group to lose more weight? One-sided, less than. Is there a difference in mean test scores between two groups of students? Two-sided test.

The ToothGrowth data has been loaded for you.

Diese Übung ist Teil des Kurses

Experimental Design in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Less than
t.test(x = ___,
       alternative = ___,
       mu = ___)
Code bearbeiten und ausführen