\documentclass[letterpaper]{article}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{natbib}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{colorlinks=false,pdfborder={0 0 0}}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
\errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{aaai}
\usepackage{times}
\usepackage{helvet}
\usepackage{courier}
\usepackage{times}
\frenchspacing
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\setcounter{secnumdepth}{0}
\begin{document}
% The file aaai.sty is the style file for AAAI Press
% proceedings, working notes, and technical reports.
%
\title{Exploring the Relationship between the Hour of Day and CitiBike Ridership}
\author{Kevin Han\\ New York University (NYU) \And Yue Cai\\ New York University (NYU) \And Xiaomeng Dong\\ New York University (NYU) \And Cheng Hou\\ New York University (NYU)}
\maketitle
\section*{Abstract}
In this analysis, we explore whether if there is a difference between the number of CitiBike rides during the rush hours of New York City and during non-rush hours. We define the rush hours of New York City to be the hours between 7 to 9 A.M. and 4 to 9 P.M during business days. We state our hypothesis and test it using a two-sided t-test. The test indicates that there is indeed a difference.
\section*{Data}
We get our data from the \href{https://www.citibikenyc.com/system-data}{$CitiBike$ $website$}. We select a random sample from each month's data in 2015. We extract the $\color{red} startime$ variable from the raw data and convert it into a $\color{red} date$ object in Python. Using the $\color{red} starttime$ variable, we create a $\color{red} HourOfDay$ variable by extracting the hour information from $\color{red} starttime$. We remove data that take place in weekends and holidays. Then we dissolve the dataset by $\color{red} HourOfDay$, and create a new variable, $\color{red} Count$, that holds the total number of ridership by hour. A detailed iPython notebook showing the code we used to wrangle the data can be found \href{https://github.com/kevinhan0/PUI2016_yxh204/blob/master/HW6_yxh204/HW6_2_yxh204.ipynb}{$here$}.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.98\columnwidth]{figures/HW6-2-yxh204chart/HW6-2-yxh204chart}
\caption{{Total Number of Rides from our randomly selected sample for each Hour of the day in 2015%
}}
\end{center}
\end{figure}
\section*{Analysis}
We state our null hypothesis as follows. At a significance level of $\alpha=0.05$, the average number of rides during the rush hours of New York City as we defined above is equal to the average number of rides during the non-rush hours of New York City, i.e.,
$$H_0: \mu_R - \mu_N = 0$$
$$H_a: \mu_R - \mu_N \neq 0$$
Under this null hypothesis, we perform a two-sided t-test using the $\color{blue} ttest \_ ind$ function from the $\color{blue} scipy.stats$ package by providing two $\color{blue} numpy$ arrays with the total number of rides by hour in rush hours and non-rush hours respectively. We arrive at the following conclusion.
Because the p-value is smaller than the significance level, we reject the null hypothesis and accept the alternative hypothesis that the average number of riders during the rush hours of New York City as we defined above is not equal to the average number of rides during the non-rush hours of New York City.
\section*{Conclusion}
We randomly chose $1 \%$ from the CitiBikes data in twelve months of year 2015 as sample. From the results of our hypothesis test, we conclude that there is a notable difference between the average number of rides during the rush hours of New York City and the average number of riders during the non-rush hours of New York City.
\selectlanguage{english}
\FloatBarrier
\end{document}