the hypothesis needs to be tested based on comparison between the means of two groups, and the t test and Z test could be used to test that there is a difference between means of 2 samples that is approximately normally distributed.
Comparision between t test and Z test:
We have no standard deviation valuation of the population, so the resulting test will not be an exact Z-test since the uncertainty in the sample variance is not accounted for, which makes t test seems better than Z test. However, it will still be a good approximation for Z test because the sample size is large enough —— the dataset for Jan 2017 has 726676 observations.
According to the article How to choose the right statistical test? (
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3116565/) This question raised is applicaple to the Question 1, is there a difference between groups that are unpaired, and t test is suitable for numerical data of two unpaired groups.
Conclusions - The result and its significance, including the weaknesses and strengths of the analysis. Either this session of the previous one should contain figures as well to show the results.
Based on the outcome of the T-Test, we could not reject the null hypothesis for the month of January, but we could reject the null hypothesis for the month of July.
This was supported by the much larger gap in the means for both payment classes during July. The mean values for the two classes in January are much closer together, which suggests only a weak relationship between trip duration and payment class. Whereas in July, the mean values are much further apart, which suggest that there is a stronger relationship between trip duration and payment class.