# An Agent-Specific Stochastic Model of Generalized Reaching Task Difficulty
## 4 Statistical Analysis on the Index of Difficulty \(ID_{agent}\) for Differently Aged Subjects
The mixed-design ANOVA reveals a significant within-subjects effect of speed (F(1,32) = 73.71, \(p<0.001\)) and between-subjects effect of age (F(1,32) = 14.70, \(p<0.001\)) on \(ID_{agent}\left(\overline{t},\varphi\right)\). An interaction between both factors (F(1,32) = 4.38, \(p<0.05\)) is also observed. To further examine the significance, four post-hoc tests are conducted, where two independent-samples t-tests are used to determine the between-subjects significance of age and two paired-samples t-tests are used to determine the within-subjects significance of speed conditions (Figure 8). Post-hoc independent-samples t-tests, using the Bonferroni correction (\(\alpha=0.05/4=0.0125\)), confirmed that the \(ID_{agent}\left(\overline{t},\varphi\right)\) of the two age groups did differ during the slow condition (t(32) = 2.65, \(p=0.01248\)) and during the fast condition (t(32) = 3.47, \(p<0.002\)), with higher \(ID_{agent}\left(\overline{t},\varphi\right)\) values in the older subjects. Post-hoc paired t-tests, using the Bonferroni correction (\(\alpha=0.05/4=0.0125\)), confirmed that the \(ID_{agent}\left(\overline{t},\varphi\right)\) of each age group did differ significantly (young: t(19) = -4.94, \(p<0.001\); old: t(13) = -7.23, \(p<0.001\)) across the two within-subjects conditions (slow vs. fast). \begin{table}
\begin{tabular}{c c c} \hline  & **Slow** & **Fast** \\ \hline Young & \(N=20\) & \(N=20\) \\ Old & \(N=14\) & \(N=14\) \\ \hline \end{tabular}
\end{table} 
Table 1: Sample size for the mixed design ANOVA. Figure 8: Mean values of \(ID_{agent}\left(\overline{t},\varphi\right)\) in each group at slow and fast speed conditions. Error bars show SEM (Standard Error of the Mean). Single asterisk indicates significant difference between young and old groups during slow speed condition, \(p<0.0125\). Double asterisks indicate significant differences across speed conditions for both age groups and a significant difference between young and old groups during fast speed condition, \(p<0.002\). In Table 2, the age and average speed of each subject walking at different speed levels obtained by the publicly available dataset [33] are shown. At given probability \(\varphi\), the \(ID_{agent}(\overline{t},\varphi)\) values have been calculated for each subject of given age in all speed conditions obtaining the following regression model:  
\[ID_{dyn}(\varphi,\ Speed,Age)=a_{\varphi}\cdot Speed^{\alpha}+b_{\varphi} \cdot Age^{\beta} \tag{9}\]  
with:  
* \"\(Age\)\" = age of the subject;
* \"\(Speed\)\" = average speed of the subject in performing a trajectory at a given speed condition;
* \(a_{\varphi}=a_{\varphi_{1}}\cdot\frac{z(\varphi_{1})}{z(\varphi)}\)
* \(b_{\varphi}=b_{\varphi_{1}}\cdot\frac{z(\varphi_{1})}{z(\varphi)}\)
* where:
* (\(a_{\varphi},\ b_{\varphi}\)) are the regression parameters obtained for a probability value of \(\varphi\);  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & & & & **Speed (m/s)** & \\ \hline
**Group** & **Age** & **Subject** & **Slow** & **Comfortable** & **Fast** \\ \hline \multirow{9}{*}{Young} & 25 & 1 & 0.824 & 1.245 & 1.544 \\  & 22 & 2 & 0.879 & 1.207 & 1.446 \\  & 33 & 3 & 0.659 & 0.929 & 1.233 \\  & 24 & 4 & 0.880 &  
* \(z(\varphi)\) is the generic z-score of a unit normal distribution corresponding to a generic probability value of \(\varphi\);
* \(z(\varphi_{1})\) is the reference z-score of a unit normal distribution corresponding to a probability value of \(\varphi_{1}\): the k-th trajectory of a subject meets, with probability \(\varphi_{1}\), the spatial constraint of width \(2\cdot z(\varphi_{1})\cdot\sigma(d_{i,k})\) at the i-th point \(p_{i}\in\overline{t}\). \(\varphi_{1}\) is a reference probability value; we set \(\varphi_{1}=0.6827\) (i.e., \(z(\varphi_{1})=1\));
* \((\alpha,\beta)\) are the regression parameters which proved, in the dataset considered, not varying with probability \(\varphi\) values.