We were suggested by Mengyun Li in our peer review to use a z-test. This would have been appropriate if we were comparing one sample to its population. However, we want to compare two different samples (customers vs. subscribers).
Our other suggestion from our peer reviewer, Tanya Nabila, suggested a Pearson's test. Yet, we aren't looking for a relationship between the two variables. It is not sufficient for testing our hypothesis because this method would have tested for a linear relationship between the two samples. We are looking to ascertain the difference between the two groups.
Because of these reasons, we decided to implement a one-sided t-test. The data is parametric because it follows a t-distribution and is numerical, and we are looking for the difference between the two groups. We also set alpha to be 0.05.
Our results of the test are as follows:
The p-value from
the t-test of two independent samples is approximately zero and the t-test statistic is positive. Therefore, we reject the null hypothesis that the average trip duration is the same or longer for a sample of users that are Subscribers compared to Customers throughout the months of January and August. The test output is shown in Figure 2 below: