\documentclass[journal]{IEEEtran}


\usepackage{amsmath,amsfonts}
\usepackage{float}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{siunitx}
\usepackage[normalem]{ulem}
\usepackage{dsfont}
\usepackage{mleftright}
\usepackage{bbm}
\usepackage[
	backend=biber,
	style=ieee,
	sorting=nty,
]{biblatex}


\usepackage{tikz}
\usetikzlibrary{spy, arrows.meta,arrows}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}

\usepackage{pgfplotstable}
\usepackage{filecontents}

\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inputs & Global Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


%
% Figures
%

\input{common.tex}
\pgfplotsset{colorscheme/rocket}

\newcommand{\figwidth}{\columnwidth}
    \newcommand{\figheight}{0.5\columnwidth}

\pgfplotsset{
	FERPlot/.style={
		line width=1pt,
		densely dashed,
	},
	BERPlot/.style={
		line width=1pt,
	},
	DFRPlot/.style={
		only marks,
	},
}

%
% Bibliography
%

\addbibresource{paper.bib}
\AtBeginBibliography{\footnotesize}


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title, Header, Footer, etc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


\newcommand\todo[1]{\textcolor{red}{#1}} 


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title, Header, Footer, etc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


\begin{document}


\title{The Effect of the Choice of Hydration Strategy on Average Academic
    Performance}

\author{Some concerned fellow students%
    \thanks{The authors would like to thank their hard-working peers as well as
    the staff of the KIT library for their unknowing - but vital -
    participation.}}

\markboth{Journal of the Association of KIT Bibliophiles}{The
    Effect of the Choice of Hydration Strategy on Average Academic Performance}

\maketitle


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Abstract & Index Terms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


\begin{abstract}
    We evaluate the \todo{\ldots} and project that by using the right button of
    the water dispenser to fill up their water bottles, students can potentially
    gain up to \todo{5 minutes} of study time a day, which is equivalent to
    raising their grades by up to \todo{0.01} levels.
\end{abstract}

\begin{IEEEkeywords}
    KIT Library, Academic Performance, Hydration
\end{IEEEkeywords}


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


\vspace*{-1mm}


%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}

\IEEEPARstart{T}{he} concepts of hydration and study have always been tightly
interwoven. As an example, an investigation was once conducted by Bell Labs
into the productivity of their employees that found that ``workers with the
most patents often shared lunch or breakfast with a Bell Labs electrical
engineer named Harry Nyquist'' \cite{gertner_idea_2012}, and we presume that
they also paired their food with something to drink. We can see that
intellectual achievement and fluid consumption are related even for the most
prestigious research institutions.

In this work, we quantify this relationship in the context of studying at the
KIT library and subsequently develop a novel and broadly applicable strategy
to leverage it to improve the academic performance of KIT students.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experimental Setup}

Over a period of one week, we monitored the usage of the water dispenser
on the ground floor of the KIT library at random times during the day.
The experiment comprised two parts, a system measurement to determine the
flowrate of the water dispenser, and a behavioral measurement, i.e., a recording
of the choice of hydration strategy of the participants: $S_\text{L}$ denotes
pressing the left button of the water dispenser, $S_\text{R}$ the right one,
and $S_\text{B}$ pressing both buttons.

For the system measurement $10$ datapoints were recorded for each strategy,
for the behavioral measurement $113$ in total.

% As is always the case with measurements, care must be taken not to alter
% quantities by measuring them. To this end, we made sure only to take system
% measurements in the absence of participants and to only record data on the
% behaviour of participants discreetly.

% TODO: Describe the actual measurement setup? (e.g., filling up a 0.7l bottle
% and timing with a standard smartphone timer)


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experimental Results}


\begin{figure}[H]
    \centering

    \begin{tikzpicture}
        \begin{axis}[
            width=0.8\columnwidth,
            height=0.35\columnwidth,
            boxplot/draw direction = x,
            grid,
            ytick = {1, 2, 3},
            yticklabels = {$S_\text{B}$ (Both buttons), $S_\text{R}$ (Right button), $S_\text{L}$ (Left button)},
            xlabel = {Flowrate (\si{\milli\litre\per\second})},
        ]
            \addplot[boxplot, fill, scol1, draw=black]
                table[col sep=comma, x=flowrate]
                    {res/flowrate_both.csv};

            \addplot[boxplot, fill, scol2, draw=black]
                table[col sep=comma, x=flowrate]
                    {res/flowrate_right.csv};

            \addplot[boxplot, fill, scol3, draw=black]
                table[col sep=comma, x=flowrate]
                    {res/flowrate_left.csv};
        \end{axis}
    \end{tikzpicture}

    \vspace*{-3mm}

    \caption{Flow rate of the water dispenser depending on the hydration strategy.}
    \label{fig:System}
\end{figure}

\begin{figure}
    \centering

    \begin{tikzpicture}
        \begin{axis}[
            ybar,
            bar width=15mm,
            width=\columnwidth,
            height=0.35\columnwidth,
            area style,
            xtick = {0, 1, 2},
            grid,
            ymin = 0,
            enlarge x limits=0.3,
            xticklabels = {\footnotesize{$S_\text{L}$ (Left button)}, \footnotesize{$S_\text{R}$  (Right button)}, \footnotesize{$S_\text{B}$}  (Both buttons)},
            ylabel = {No. chosen},
        ]
            \addplot+[ybar,mark=no,fill=scol1] table[skip first n=1, col sep=comma, x=button, y=count]
                {res/left_right_distribution.csv};
        \end{axis}
    \end{tikzpicture}

    \vspace*{-3mm}

    \caption{Distribution of the choice of hydration strategy.}
    \label{fig:Behavior}
\end{figure}


Fig. \ref{fig:System} shows the results of the system measurement.
We observe that $S_\text{L}$ is the slowest strategy, while $S_\text{R}$
and $S_\text{B}$ are similar. Due to the small sample size and the
unknown distribution, the test we chose to verify this observation is a Mann
Whitney U test. We found that $S _\text{L}$ is faster than $S_\text{R}$ with a
significance of $p < 0.0001$, while no significant statement could be made
about $S_\text{R}$ and $S_\text{B}$.

Fig. \ref{fig:Behavior} shows the results of the behavioral measurement.
During this part of the experiment, we also measured the time each participant
needed to fill up their bottle. Using the measured flowrates we calculated
the mean refill volume to be $\SI{673.92}{\milli\liter}$.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Discussion}

We can consider the water dispenser and students as comprising a queueing
system, specifically an M/G/1 queue \cite{stewart_probability_2009}.
The response time, i.e., the time spent waiting as well as
the time dispensing water, is \cite[Section 14.3]{stewart_probability_2009}%
\begin{align*}
    W = E\mleft\{ S \mright\} + \frac{\lambda E\mleft\{ S^2 \mright\}}{2\mleft( 1-\rho \mright)}
    ,%
\end{align*}%
where $S$ denotes the service time (i.e., the time spent refilling a bottle),
$\lambda$ the mean arrival time, and $\rho$ the system utilization. Using our
experimental data we can approximate all parameters and calculate
\todo{$W \approx 123$} (See the appendix for a complete derivation).
% We examine the effects of the choice of hydration strategy. To
% this end, we start by estimating the potential time savings possible by always
% choosing the fastest strategy:%
% %
% % We can model the time needed for one person to refill their bottle as a random
% % variable (RV) $T_1 = V/R$ and the time saved by choosing the fastest strategy
% % as $\Delta T_1 = T_1 - V/\max r$, where $V$ and $R$ are RVs representing the
% % bottle volume and flowrate. The potential time saving for the last person in a
% % queue of $N$ people is thus $\Delta T_N = N\cdot\Delta T_1$. We can then model
% % the total time savings as $\Delta T_\text{tot} = \sum_{n=1}^{N} \Delta T_n$,
% % where N is an RV describing the queue length. Assuming the independence of all
% % RVs we can compute the mean total time savings as
% %
% \begin{gather*}
%     T_1 = V/R, \hspace{3mm} \Delta T_1 = T_1 - V/\max R, \hspace{3mm} \Delta T_n = n \cdot \Delta T_1 \\
%     \Delta T_\text{tot} = \sum_{n=1}^{N} \Delta T_\text{n} = \sum_{n=1}^{N} n \cdot \Delta T_1 = \Delta T_1 \frac{N\mleft( N+1 \mright)}{2} \\
%     \Delta t := E\mleft\{ \Delta T_\text{tot} \mright\} = E\mleft\{ \Delta T_1 \mright\} \cdot \mleft[ E\mleft\{ N^2 \mright\} + E\mleft\{ N \mright\} \mright]/2
%     ,%
% \end{gather*}
% %
% where $V$ and $R$ are random variables (RVs) representing the volume of a
% bottle and the flowrate, $\Delta T_n$ describes the time the last of $n$
% people saves, $\Delta T_\text{tot}$ the total time savings and $N$ the length
% of the queue. It is plausible to assume independence of $R,V$ and $N$.
% Using our experimental measurements we estimate $\todo{\Delta t = \SI{20}{\second}}$

Many attempts have been made in the literature to relate the time spent
studying to academic achievement -  see, e.g.
\cite{schuman_effort_1985, zulauf_use_1999, michaels_academic_1989, dickinson_effect_1990}.
The overwhelming consensus is that there is a significant relationship,
though it is a weak one.
%
\todo{
\begin{itemize}
    \item Compute possible grade gain
\end{itemize}}
%Many of the studies were only performed over
% a period of one week or even day, so we believe care should be taken when
% generlizing these results. Nevertheless, the overwhelming consensus in the
% literature is that a significant relationship exists, though it is a weak one.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusion}


In this study, we investigated how the choice of hydration strategy affects
the average academic performance. We found that always choosing to
press the right button leads to an average time gain of \todo{\SI{10}{\second}}
per day, which translates into a grade improvement of $\todo{0.001}$ levels.
We thus propose a novel and broadly applicable strategy to boost the average
academic performance of KIT students: always pressing the right button.

% Further research is needed to develop a better model of how the choice of
% hydration strategy is related to academic performance. We
% suspect that there is a compounding effect that leads to $S_\text{L}$ being an
% even worse choice of hydration strategy: When the queue is long, students are
% less likely to refill their empty water bottles, leading to reduced mental
% ability. Nevertheless, we believe that with this work we have laid a solid
% foundation and hope that our results will find widespread acceptance among the
% local student population.


%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%


\printbibliography

\appendix

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Derivation of Service Time}
\label{sec:Derivation of Service Time}


We want to compute the response time of our queueing system, i.e.,
\cite[Section 14.3]{stewart_probability_2009}
\begin{align*}
    W = E\mleft\{ S \mright\} + \frac{\lambda E\mleft\{ S^2 \mright\}}{2\mleft( 1-\rho \mright)}
    .%
\end{align*}%
We start by modelling the service time and subsequently calculate $\lambda$
and $\rho$.

Let $S, V$ and $R$ be random variables denoting the service time, refill volume
and refill rate, respectively. Assuming that $V$ and $R$ are independent, we 
have
\begin{gather*}
    S = \frac{V}{R} \hspace{5mm} \text{and} \hspace{5mm}
    P_R(r) = \left\{\begin{array}{rl}
        P(S_\text{L}), & r = r_{S_\text{L}} \\
        1-P(S_\text{L}), & r = r_{S_\text{R}}
    \end{array}\right.
\end{gather*}%
\begin{align*}
    E\mleft\{ S^2 \mright\} &= E\mleft\{ V^2 \mright\}E\mleft\{ 1 / R^2  \mright\} \\
    & = E\mleft\{ V^2 \mright\} \mleft( P(S_\text{L})\frac{1}{r^2_{S_\text{L}}} + \mleft( 1 - P(S_\text{L}) \mright)\frac{1}{r^2_{S_\text{R}}}  \mright)
    .%
\end{align*}
We now use our experimental data (having calculated $v_n, n\in [1:N]$ from the
measured fill times and flow rates) to compute
\begin{align*}
    \left.
    \begin{array}{r}
        E\mleft\{ V^2 \mright\} \approx \frac{1}{N+1} \sum_{n=1}^{N} v_n^2 = \todo{15}\\
        P(S_\text{L}) \approx \frac{\text{\# times $S_\text{L}$ was chosen}}{N} = \todo{123} \\
        r^2_{S_\text{L}} \approx \todo{125} \\
        r^2_{S_\text{R}} \approx \todo{250}
    \end{array}
    \right\} \Rightarrow
    \left\{
    \begin{array}{l}
        E\mleft\{ S \mright\} \approx \todo{678} \\
        E\mleft\{ S^2 \mright\} \approx \todo{123}
    \end{array}
    \right.
    .%
\end{align*}

$\lambda$ is the mean arrival time.

\todo{
    \textbf{TODOs:}
    \begin{itemize}
        \item Complete text describing / obtaining $\rho$ and $\lambda$
        \item Move model derivation to method section
        \item Move calculations with model to results section
        \item Add grade gain derivation
        \item Idea: Make the whole thing 2 pages and print on A3
    \end{itemize}
}


\end{document}

