\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{The number of Citi Bike riders by user types}



\author[1]{Minqi Lu}%
\affil[1]{New York University (NYU)}%


\vspace{-1em}



  
  \date{May 10, 2024}


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








\sloppy


\par\null

\textbf{Abstract:}

In this project I use the 201502 Citi Bike data to do a hypothesis test
and state the null hypothesis which is the proportion of subscribers
biking on weekends is the same or higher than the proportion of
customers biking on weekends. ~After applying z-test, I reject my null
hypothesis since p value is significantly smaller than significance
level 0.05. ~Hence, the alternative hypothesis can be accepted that~the
proportion of subscribers biking on weekends is less than the proportion
of customers biking on weekends. Also, I check the robustness of my
answer by using 201507 Citi Bike data and to see if my result holds in
the summer. The result is the z statistic is even larger in the summer.

\par\null

\textbf{Introduction:}

Citi Bike is public bicycle sharing system serving New York City and its
trip data is public and can be downloaded from Citi Bike website which
includes Trip Duration, Start Time and Date, Station ID and Bike Id etc.
Since there are two types of users, it is interesting to analyze whether
subscribers are more likely than customers to choose biking for
commuting on weekend.

\par\null

\textbf{Data:}

I use the 201502 Citi Bike data and drop the irrelevant columns except
user type and date. ~Then I count the number of each user type for each
day of the week and using the histogram to show the distribution.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-4-40-41-PM/Screen-Shot-2018-11-10-at-4-40-41-PM}
\caption{{Fig. 1 ~ Distribution of Citi Bike bikers by user type in February 2015,
absolute counts
{\label{926945}}%
}}
\end{center}
\end{figure}

Looking at Figure 1, it is not a good plot since customers' numbers are
really small and hard to visualize in the plot. Thus, I normalize~the
distribution of subscribers, and that of customers, i.e. devide them by
the total number of rides for that user type.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-4-52-42-PM/Screen-Shot-2018-11-10-at-4-52-42-PM}
\caption{{Fig.2~Distribution of Citi Bike bikers by user type in February 2015,
normalized. ~
{\label{469941}}%
}}
\end{center}
\end{figure}

After normalizing, it shows better plot for the fraction of riders of
different user types. And then I group them as weekdays and weekends.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-6-29-20-PM/Screen-Shot-2018-11-10-at-6-29-20-PM}
\caption{{Fig. 3 ~Fraction of Citi Bike bikers per rider type in February 2015 for
weekdays (left) and weekends (right)
{\label{894778}}%
}}
\end{center}
\end{figure}

\subsection*{}\label{section}

\par\null

\textbf{Methodology:}

I state my null hypothesis as the proportion of subscribers biking on
weekends is the same or higher than the proportion of customers biking
on weekends and use z-test to test the null hypothesis. Reviewer
suggests to use t-test, but since sample size is large and standard
deviation is known, z-test will be a better choice.

\par\null\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-5-24-07-PM/Screen-Shot-2018-11-10-at-5-24-07-PM}
\caption{{Fig. 4 ~t-test formulas
{\label{697795}}%
}}
\end{center}
\end{figure}

\par\null

\textbf{Conclusions:}\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-5-40-46-PM/Screen-Shot-2018-11-10-at-5-40-46-PM}
\caption{{Fig . 5 ~z statistic for 201502
{\label{234096}}%
}}
\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Screen-Shot-2018-11-10-at-6-23-36-PM/Screen-Shot-2018-11-10-at-6-23-36-PM}
\caption{{Fig. 6. z statistic for 201507 summer
{\label{967096}}%
}}
\end{center}
\end{figure}

The smallest number reported in~ z stats tables is (typically) -3, which
gives~ a p value p \textless{}0.0002 and ~is smaller than~my chosen
significance level alpha=0.05, so it is statistically significant. We
reject the null hypothesis and accept alternative hypothesis that the
proportion of subscribers biking on weekends is less than the proportion
of customers biking on weekends. I also check the robustness of my
answer by using 201507 Citi Bike data, and the z statistic is even
larger. This shows my hypothesis is robust in the summer.~

\par\null

\textbf{GitHub Link:}

\textbf{\href{https://github.com/louisalulu/PUI2018_ml4922/blob/master/HW8_ml4922/HW8_Assignment2_ml4922.ipynb}{https://github.com/louisalulu/PUI2018\_ml4922/blob/master/HW8\_ml4922/HW8\_Assignment2\_ml4922.ip}}

\par\null

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

