Get startedGet started for free

Pairwise t-tests

Manually running separate comparisons using individual t-tests can be a pain as the number of groups gets larger. Thankfully, the pingouin package's .pairwise_tests() method can make things easier.

You will explore the differences in average time-on-page metric between four different landing page variants loaded in the homepage DataFrame.

The dataset homepage is available and has the columns signup and time_on_page. Every row in the DataFrame corresponds to a unique user visiting the respective landing_page. The signup column consists of binary data: '1' means the user signed up and '0' means abandoned the page, and the time_on_page column represents the time (in seconds) each user spent on the landing page before abandoning or signing up . pingouin has been loaded along with pandas and numpy.

This exercise is part of the course

A/B Testing in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Perform a pairwise t-test on signup, grouped by landing-page
pairwise = pingouin.pairwise_tests(data=homepage,
                                   dv="____",
                                   between="____",
                                   padjust="____")

print(pairwise)
Edit and Run Code