Methodology
In order to investigate the night ridership by age groups, I need to compare the ratio of trips at night over the total number for two age groups, therefore I chose one-tail two-propotion Z test. In the review, Emily suggested a null hypothesis that the proportions equal to each other because of the lack of knowledge about the two proportions before testing. Therefore, in the second part, a chi-square test was also perfomed as suggested in Emily's review.
The proportions of biking at night and the sample sizes for two age groups are listed below, where Y represents younger riders and O represents older riders.
\(P_0=\frac{Y_{night}}{Y_{total}}=0.219,\ \ n_0=160822\)
\(P_1=\frac{O_{night}}{O_{total}}=0.141,\ \ n_1=168151\)
For both tests, the significance level \(\alpha=0.05\) is chosen.