t-test vs. Mann-Whitney U test
A t-test and a Mann-Whitney U test can both assess whether two groups are significantly different. An independent t-test is a parametric test assessing the means of the groups while the Mann-Whitney U test is non-parametric and assesses the rank order of the groups. If the data is normally distributed, either test can be performed but the Mann-Whitney U test is less sensitive and makes fewer assumptions about the underlying data.
In this exercise, you'll run both tests on the same dataset to assess whether your A/B groups of students that had access to a laptop/desktop or a smartphone for course work spent more time on social media during Covid-19.
The covid
dataset, and the pwr
and effectsize
packages have been loaded for you.
This exercise is part of the course
A/B Testing in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Run an independent t-test assessing time on social media
t.test(___, data = ___, var.equal = ___)
cohens_d(___, data = ___)