\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage[round]{natbib}
\let\cite\citep




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}










\begin{document}

\title{Citi Bike Project}



\author[1]{Bianca Brusco}%
\author[2]{Michael Sampson}%
\author[1]{Gokmen Dedemen}%
\affil[1]{New York University (NYU)}%
\affil[2]{NYU Center for Urban Science \& Progress}%


\vspace{-1em}



  
  \date{May 08, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup





\selectlanguage{english}
\begin{abstract}
Bike sharing has gained in popularity as a mean of transportation in
urban systems. In New York City, data from Citi Bike usage is publicly
available, so trends in riderships can be investigated. In this project,
we use one month's data to examine riding trends for Citi Bike
subscribers and occasional users of the service, to understand whether
there is a difference in the likelihood of taking shorter trips between
the two groups. The results show that subscribers are indeed more likely
to take shorter trips. One possible explanation of this result is that
subscribers are choosing Citi Bike as a mode of transport to cover
shorter, so called `last-mile', segments of their commute more
frequently than occasional users. {[}even when needing to cover shorter
distances{]}%
\end{abstract}%



\sloppy


\subsection*{Introduction}

{\label{526478}}

New York City introduced a bike-sharing system in 2013: Citi Bike. The
service can be used either by subscribing with an yearly membership or
by purchasing an occasional pass. The two groups of users are defined as
subscribers and as customers. In this project, we investigate whether
the ratio of trips longer than average to trips shorter than average is
smaller for subscribers than for customers. Indeed, the first group
might be more likely to use Citi Bike for shorter trips,~as there is no
extra charge per trip, while customers might decide to get a pass only
to cover more substantial distances.

\subsection*{Data}

{\label{908646}}

Citi Bike data is publicly available
at~~\url{https://www.citibikenyc.com/system-data}. For this project, we
use ridership data from one single month: January 2015.~Processing of
the data was completed with Pandas for Python 3.~

The dataset includes 28,5552 observations, 27,9924 of which are
categorized as subscribers and 5,628 as customers.~~

The~observed distribution of trip duration for the two groups is shown
in Figures 1 and 2. A brief visual examination of these distribution
plots suggest that trip duration for trips made by subscribers and
customers may differ in an important way.

\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/fig1/fig1}
\caption{{Distribution of trip duration for subscribers and customers.~
{\label{235383}}%
}}
\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/download/fig2}
\caption{{Box plot for trip duration, by user type.
{\label{937860}}%
}}
\end{center}
\end{figure}

\par\null

\subsection*{Methodology}

{\label{443820}}

We compute the mean trip duration for the whole sample, which is 10.96
minutes. Therefore, we define a long trip to be a trip with duration
longer than 11 minutes, and a short trip to be a trip with duration
shorter than 11 minutes.~

We test the null hypothesis that the mean trip duration for subscribers
is equal or longer than the mean trip duration for consumers, against
the alternative hypothesis that the mean trip duration for subscribers
is shorter than for customers. We use a significance level
of~\(\alpha=0.05\)

Indeed, we are testing

\(H_0:\frac{S_{long}}{S_{short}}\ge\frac{C_{long}}{C_{short}}\)

\(H_A:\frac{S_{long}}{S_{short}}<\frac{C_{long}}{C_{short}}\)

Where~\(S_{long}\)~is the number of long trips taken by
subscribers and~\(S_{short}\) is the number of short trips taken by
subscribers. Similar ~ notation holds for customers.\(\)

To investigate the difference in means,~ we use a Z-test, as we are
investigating whether two sample proportions appear to come from the
same population or not.~

An alternative would be to use a Chi-square test. But since we are only
testing two proportions, the results should be the same for both tests.

\subsection*{Conclusions}

{\label{892807}}

The samples we have used from the population have different proportions
of longer to shorter trips.~

We can observe the distribution of customer and subscriber trips by trip
duration (long and short trips) with the bar plots below, normalized
(Fig. 3)

We can also observe the distribution of shorter and longer trips by user
group with the bar plots below, first for absolute counts (Fig. 4) and
then normalized (Fig. 5).~

\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/absolute-counts/fig3}
\caption{{Distribution of Customer and Subscriber Trips by Trip Duration, absolute
counts with statistical errors
{\label{709386}}%
}}
\end{center}
\end{figure}



We see that while subscribers take more shorter trips, customers take
more longer trips.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/fig3/fig3}
\caption{{Distribution of Citibike bikers by user type in January 2015, absolute
counts, with statistical errors
{\label{487094}}%
}}
\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/fig4/fig4}
\caption{{Distribution of Citibike bikers by user type in January 2015,
normalized.
{\label{802590}}%
}}
\end{center}
\end{figure}

We see again that while subscribers take more shorter trips, customers
take more longer trips.

\par\null

We conduct a Z test comparing the two proportions, and obtain a Z-score
with absolute value of 414.45. This Z-score is significantly larger than
the Z-score for 0.05 significance level, which is 2.96. Therefore, we
reject our null hypothesis, and conclude that the ratio of
longer/shorter trips is smaller for subscribers than for customers.~

\par\null

\selectlanguage{english}
\FloatBarrier
\end{document}

