CitiBike Project: Do men take longer bike trips than women?

Do men take longer CitiBike trips than women?

The goal of this project was to test whether men take longer CitiBike trips than women. The null hypothesis: 

The number of women taking longer trips on Citi Bike is the same or higher than the number of men taking Citi Bike trips.

The significance level was set at 0.05.

The null and alternative hypotheses could be represented with the following formulas:

H0 = W(time of the trip) > = M(time of the trip)

H1 = W(time of the trip) < M(time of the trip)

For this project a CitiBike Share data from OpenNYC database has been used. Dataset was processed to only include 'gender' column (1=male, 2=female) and 'trip duration' column. The default values of trip duration were in seconds.

Visual Analysis:
In the initial histogram visualization a tail of several outliers became apparent (trip durations that lasted longer than 2,000 seconds, or around 30 mins). The outliers were dropped and resulted in the histogram below.

The final histogram plot showed that the majority of women undertook trips no longer than 20 minutes (up to 1,200 seconds), while men undertook trips up to 26 minutes (up to 1,600 seconds). The visual analysis rejected the null hypothesis of women taking longer trips than men. 

Male and female riders against trip duration (CitiBike Share open data).
Testing and Results:
In order to test the results, as t-test was used, as it answers the question whether differences exist between 2 groups on one dependent variable. T-test results showed p-value of 0.02, which is less than 0.05. Therefore, we can confirm the fact that we can reject the null hypothesis. 

[Someone else is editing this]

You are editing this file