Add mean bottle size, mathematical model

This commit is contained in:
Andreas Tsouchlos 2025-03-12 16:31:16 +01:00
parent be1f0aa784
commit 3181b2ac4e
4 changed files with 227 additions and 40 deletions

106
paper.tex
View File

@ -159,10 +159,13 @@ 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, pressing the left button of the water dispenser, $S_\text{R}$ the right one,
and $S_\text{B}$ pressing both buttons. and $S_\text{B}$ pressing both buttons.
As is always the case with measurements, care must be taken not to alter For the system measurement $10$ datapoints were recorded for each strategy,
quantities by measuring them. To this end, we made sure only to take system for the behavioral measurement it was $113$ in total.
measurements in the absence of participants and to only record data on the
behaviour of participants discreetly. % 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 % TODO: Describe the actual measurement setup? (e.g., filling up a 0.7l bottle
% and timing with a standard smartphone timer) % and timing with a standard smartphone timer)
@ -177,8 +180,8 @@ behaviour of participants discreetly.
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[ \begin{axis}[
width=0.85\columnwidth, width=0.8\columnwidth,
height=0.4\columnwidth, height=0.35\columnwidth,
boxplot/draw direction = x, boxplot/draw direction = x,
grid, grid,
ytick = {1, 2, 3}, ytick = {1, 2, 3},
@ -199,11 +202,13 @@ behaviour of participants discreetly.
\end{axis} \end{axis}
\end{tikzpicture} \end{tikzpicture}
\caption{Flow rate of the water dispenser depending on the button pressed.} \vspace*{-3mm}
\caption{Flow rate of the water dispenser depending on the hydration strategy.}
\label{fig:System} \label{fig:System}
\end{figure} \end{figure}
\begin{figure}[H] \begin{figure}
\centering \centering
\begin{tikzpicture} \begin{tikzpicture}
@ -211,31 +216,39 @@ behaviour of participants discreetly.
ybar, ybar,
bar width=15mm, bar width=15mm,
width=\columnwidth, width=\columnwidth,
height=0.4\columnwidth, height=0.35\columnwidth,
area style, area style,
xtick = {0, 1, 2}, xtick = {0, 1, 2},
grid, grid,
ymin = 0, ymin = 0,
enlarge x limits=0.3, enlarge x limits=0.3,
xticklabels = {Left button, Right button, Both buttons}, xticklabels = {\footnotesize{$S_\text{L}$ (Left button)}, \footnotesize{$S_\text{R}$ (Right button)}, \footnotesize{$S_\text{B}$} (Both buttons)},
ylabel = {No. of presses}, ylabel = {No. chosen},
] ]
\addplot+[ybar,mark=no,fill=scol1] table[skip first n=1, col sep=comma, x=button, y=count] \addplot+[ybar,mark=no,fill=scol1] table[skip first n=1, col sep=comma, x=button, y=count]
{res/left_right_distribution.csv}; {res/left_right_distribution.csv};
\end{axis} \end{axis}
\end{tikzpicture} \end{tikzpicture}
\vspace*{-3mm}
\caption{Distribution of the choice of hydration strategy.} \caption{Distribution of the choice of hydration strategy.}
\label{fig:Behavior} \label{fig:Behavior}
\end{figure} \end{figure}
Fig. \ref{fig:System} indicates that $S_\text{L}$ is the slowest
strategy, while $S_\text{R}$ and $S_\text{B}$ are similar. Fig. \ref{fig:System} shows the results of the system measurement.
Due to the small sample size ($N=10$) and the unknown distribution, the test We observe that $S_\text{L}$ is the slowest strategy, while $S_\text{R}$
we chose to verify this observation is a Mann-Whitney U test. We found that and $S_\text{B}$ are similar. Due to the small sample size and the
$S _\text{L}$ is faster than $S_\text{R}$ with a significance of $p < 0.0001$, unknown distribution, the test we chose to verify this observation is a Mann
while no significant statement could be made about $S_\text{R}$ and Whitney U test. We found that $S _\text{L}$ is faster than $S_\text{R}$ with a
$S_\text{B}$. 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 bottle size to be $\SI{673.92}{\milli\liter}$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -243,25 +256,40 @@ $S_\text{B}$.
We examine the effects of the choice of hydration strategy. To We examine the effects of the choice of hydration strategy. To
this end, we first estimate the amount of time saved by choosing a certain this end, we start by estimating the potential time savings possible by always
strategy and relate that to a possible gain in academic performance, i.e., choosing the fastest strategy:%
grades.%
% %
\todo{ % We can model the time needed for one person to refill their bottle as a random
\begin{itemize} % variable (RV) $T_1 = V/R$ and the time saved by choosing the fastest strategy
\item ``We measured the average bottle size'' % as $\Delta T_1 = T_1 - V/\max r$, where $V$ and $R$ are RVs representing the
\item Quantify relationship: Compute average time saving by using right % bottle volume and flowrate. The potential time saving for the last person in a
button $\rightarrow$ translate into grade gain % queue of $N$ people is thus $\Delta T_N = N\cdot\Delta T_1$. We can then model
\item People using the left button slow down the entire queue % the total time savings as $\Delta T_\text{tot} = \sum_{n=1}^{N} \Delta T_n$,
behind them, not only themselves % where N is an RV describing the queue length. Assuming the independence of all
\end{itemize} % 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} \\
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$.
Many attempts have been made in the literature to relate the time spent Many attempts have been made in the literature to relate the time spent
studying to academic achievement - see, e.g. studying to academic achievement - see, e.g.
\cite{schuman_effort_1985, zulauf_use_1999, michaels_academic_1989, dickinson_effect_1990}. \cite{schuman_effort_1985, zulauf_use_1999, michaels_academic_1989, dickinson_effect_1990}.
The overwhelming consensus is that there is a significant relationship, The overwhelming consensus is that there is a significant relationship,
though it is a weak one. though it is a weak one.
%
\todo{
\begin{itemize}
\item Compute possible grade gain
\end{itemize}}
%Many of the studies were only performed over %Many of the studies were only performed over
% a period of one week or even day, so we believe care should be taken when % 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 % generlizing these results. Nevertheless, the overwhelming consensus in the
@ -273,20 +301,20 @@ though it is a weak one.
In this study, we investigated how the choice of hydration strategy affects In this study, we investigated how the choice of hydration strategy affects
the average academic performance of a student. We found that always choosing to 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}} 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. 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 We thus propose a novel and broadly applicable strategy to boost the average
academic performance of KIT students: always pressing the right button. academic performance of KIT students: always pressing the right button.
Further research is needed to develop a better model of how the choice of % Further research is needed to develop a better model of how the choice of
hydration strategy is related to academic performance. We % hydration strategy is related to academic performance. We
suspect that there is a compounding effect that leads to $S_\text{L}$ being an % 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 % 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 % 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 % 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 % foundation and hope that our results will find widespread acceptance among the
local student population. % local student population.
% %

View File

@ -0,0 +1,114 @@
time,button
28,left
22,left
17,left
40,left
24,left
41,left
11,left
11,left
26.56,left
37,left
30,left
30,left
8,left
21,left
20,left
19,left
28,left
20,left
21,left
16.43,left
16,left
29,left
20,left
24,left
22,left
15,left
13,left
22,left
23,left
40,left
19.8,left
35.38,left
21,left
16.3,left
29.3,left
30.3,left
30.2,left
25,left
14,left
14.1,left
40,left
24.4,left
5.2,left
50,left
29.7,left
39,left
17,left
40.7,left
27.3,left
19.8,left
7.55,right
14,right
9,right
13,right
5,right
13,right
13.58,right
15.58,right
25,right
20,right
14,right
13,right
14,right
13.3,right
19,right
13,right
10,right
15,right
14,right
19.4,right
12.8,right
13.5,right
19.31,right
27.5,right
13.1,right
23.6,right
15,right
18.7,right
18,right
12.7,right
40.3,right
12.86,right
22.9,right
10,right
20,right
12,right
19,right
39.8,right
20,both
20,both
15,both
19,both
13,both
7,both
15,both
17.3,both
12,both
23,both
11.26,both
35.66,both
13.54,both
27.81,both
16.83,both
17.13,both
17.8,both
39,both
11,both
13.6,both
21.7,both
14.25,both
12,both
12.9,both
12.35,both
1 time button
2 28 left
3 22 left
4 17 left
5 40 left
6 24 left
7 41 left
8 11 left
9 11 left
10 26.56 left
11 37 left
12 30 left
13 30 left
14 8 left
15 21 left
16 20 left
17 19 left
18 28 left
19 20 left
20 21 left
21 16.43 left
22 16 left
23 29 left
24 20 left
25 24 left
26 22 left
27 15 left
28 13 left
29 22 left
30 23 left
31 40 left
32 19.8 left
33 35.38 left
34 21 left
35 16.3 left
36 29.3 left
37 30.3 left
38 30.2 left
39 25 left
40 14 left
41 14.1 left
42 40 left
43 24.4 left
44 5.2 left
45 50 left
46 29.7 left
47 39 left
48 17 left
49 40.7 left
50 27.3 left
51 19.8 left
52 7.55 right
53 14 right
54 9 right
55 13 right
56 5 right
57 13 right
58 13.58 right
59 15.58 right
60 25 right
61 20 right
62 14 right
63 13 right
64 14 right
65 13.3 right
66 19 right
67 13 right
68 10 right
69 15 right
70 14 right
71 19.4 right
72 12.8 right
73 13.5 right
74 19.31 right
75 27.5 right
76 13.1 right
77 23.6 right
78 15 right
79 18.7 right
80 18 right
81 12.7 right
82 40.3 right
83 12.86 right
84 22.9 right
85 10 right
86 20 right
87 12 right
88 19 right
89 39.8 right
90 20 both
91 20 both
92 15 both
93 19 both
94 13 both
95 7 both
96 15 both
97 17.3 both
98 12 both
99 23 both
100 11.26 both
101 35.66 both
102 13.54 both
103 27.81 both
104 16.83 both
105 17.13 both
106 17.8 both
107 39 both
108 11 both
109 13.6 both
110 21.7 both
111 14.25 both
112 12 both
113 12.9 both
114 12.35 both

View File

@ -0,0 +1,45 @@
import numpy as np
import pandas as pd
filename_participants = "res/full_participant_measurement.csv"
filename_left = "res/flowrate_left.csv"
filename_right = "res/flowrate_right.csv"
filename_both = "res/flowrate_both.csv"
def main():
# Get bottle fillup times
df_part = pd.read_csv(filename_participants)
times_left = np.array(df_part[df_part["button"] == "left"]["time"])
times_right = np.array(df_part[df_part["button"] == "right"]["time"])
times_both = np.array(df_part[df_part["button"] == "both"]["time"])
# Get mean flowrates
df_left = pd.read_csv(filename_left)
df_right = pd.read_csv(filename_right)
df_both = pd.read_csv(filename_both)
flowrate_left = np.mean(np.array(df_left["flowrate"]))
flowrate_right = np.mean(np.array(df_right["flowrate"]))
flowrate_both = np.mean(np.array(df_both["flowrate"]))
# Calculate mean bottle size
sizes_left = times_left * flowrate_left
sizes_right = times_right * flowrate_right
sizes_both = times_both * flowrate_both
sizes = np.concatenate([sizes_left, sizes_right, sizes_both])
mean_size = np.mean(sizes)
print(f"Mean bottle size: {mean_size}")
if __name__ == "__main__":
main()

View File

@ -16,7 +16,7 @@ def main():
flowrate_right = np.array(df_right["flowrate"]) flowrate_right = np.array(df_right["flowrate"])
df_both = pd.read_csv(filename_both) df_both = pd.read_csv(filename_both)
flowrate_both = np.array(df_right["flowrate"]) flowrate_both = np.array(df_both["flowrate"])
U_lr, p_lr = mannwhitneyu(flowrate_left, flowrate_both, method="exact") U_lr, p_lr = mannwhitneyu(flowrate_left, flowrate_both, method="exact")
U_rb, p_rb = mannwhitneyu(flowrate_right, flowrate_both, method="exact") U_rb, p_rb = mannwhitneyu(flowrate_right, flowrate_both, method="exact")