Movement Metrics

This sections describes metrics related to the movement of the mouse or touch interactions.

All of this metrics can be computed by using traces. To understand traces, please refer to the Segmentation section in the documentation.

Velocity

The velocity is the rate of change of position with respect to time. Commonly used to analyze the speed of movement during user interactions [Katerina and Nicolaos, 2018, Kieslich et al., 2019]. Computer mouses have been proven to be reliable enough to measure human velocity [O'Reilly and Plamondon, 2011] and have even been considered as valid tools to obtain markers for cognitive immpairment [Seelye et al., 2015]. Velocity and time have also been proven to be affected by aging [Pariente-Martinez et al., 2016] up to a certain point and for some activies carried out in computers and web enviornments.

The function velocity() computes the velocity based on the distance and time difference between consecutive points. The velocity is calculated as:

\[v_i = \frac{\sqrt{(x_{i} - x_{i-1})^2 + (y_{i} - y_{i-1})^2}}{t_{i} - t_{i-1}}\]

where (\(x_i\), \(y_i\)) are the coordinates and (\(t_i\)) is the timestamp of point (\(i\)).

The function velocity_metrics() computes the mean, max, and min of the velocity values for each session.

Acceleration

The acceleration is the rate of change of velocity with respect to time, which provides insights into how quickly users change their speed during interactions [Katerina and Nicolaos, 2018, Kieslich et al., 2019].

The function acceleration() computes the acceleration based on the change in velocity over time from a DataFrame or session traces.

The acceleration is calculated as:

\[a_i = \frac{v_{i} - v_{i+1}}{t_{i} - t_{i+1}}\]

where (\(v_i\)) is the velocity at point (\(i\)) and (\(t_i\)) is the timestamp of point (\(i\)).

Maximum, minimum, and mean acceleration metrics for each session can be computed using the function acceleration_metrics().

Jerkiness

The function jerkiness() computes the jerkiness of interaction points from a DataFrame or session traces, based on the change in acceleration over time.

The jerkiness is calculated as the change in acceleration per unit time:

\[j_i = \frac{a_{i} - a_{i+1}}{t_{i} - t_{i+1}}\]

where (\(a_i\)) is the acceleration at point (\(i\)) and (\(t_i\)) is the timestamp of point (\(i\)).

The function jerkiness_metrics() computes jerkiness metrics such as mean, max, and min jerkiness for each session.

Angle

The angle metric measures the turning angle formed by three consecutive points in a trajectory. The function angle() computes this angle from the vectors defined by neighboring points around the middle point.

If the trajectory contains points \(p_{i-1}, p_i, p_{i+1}\) with vectors

\[u = p_i - p_{i-1}, \qquad v = p_{i+1} - p_i\]

then the turning angle is the angle between \(u\) and \(v\). This provides a local measure of curvature and directional change between consecutive segments.

When called on a DataFrame, the function can return the angle series directly or, when traces are provided, it can compute the angle for each trace separately and return the results grouped by session.

Angular Velocity

The function angular_velocity() computes the change in angular position over time. In other words, it estimates the rate at which the trajectory turns as the user moves.

If the angle values are denoted by \(\theta_i\) and the timestamps by \(t_i\), the angular velocity is computed as:

\[\omega_i = \frac{\theta_i - \theta_{i-1}}{t_i - t_{i-1}}\]

The implementation automatically derives the required angle and time-difference columns when they are missing, and it can operate either on the whole DataFrame or on each trace in a session.

Angular Acceleration

The function angular_acceleration() computes the change in angular velocity over time. This metric captures how quickly the turning rate itself changes during the movement.

If the angular velocity is denoted by \(\omega_i\), then angular acceleration is:

\[\alpha_i = \frac{\omega_i - \omega_{i-1}}{t_i - t_{i-1}}\]

As with angular velocity, the implementation can work directly on a DataFrame or over session traces, and it will compute any intermediate columns needed before estimating the acceleration.

References

[1] (1,2)

Tzafilkou Katerina and Protogeros Nicolaos. Mouse behavioral patterns and keystroke dynamics in End-User development: what can they tell us about users' behavioral attributes? Comput. Human Behav., 83:288–305, June 2018. URL: https://doi.org/10.1016/j.chb.2018.02.012.

[2]

Catia Cepeda, Joao Rodrigues, Maria Camila Dias, Diogo Oliveira, Dina Rindlisbacher, Marcus Cheetham, and Hugo Gamboa. Mouse tracking measures and movement patterns with application for online surveys. In Lecture Notes in Computer Science, Lecture notes in computer science, pages 28–42. Springer International Publishing, Cham, 2018. URL: https://dl.acm.org/doi/10.1007/978-3-319-99740-7_3.

[3]

Adriana Seelye, Stuart Hagler, Nora Mattek, Diane B Howieson, Katherine Wild, Hiroko H Dodge, and Jeffrey A Kaye. Computer mouse movement patterns: a potential marker of mild cognitive impairment. Alzheimers Dement. (Amst.), 1(4):472–480, December 2015. URL: https://alz-journals.onlinelibrary.wiley.com/doi/10.1016/j.dadm.2015.09.006.

[4]

Iftikhar Ahmed Khan, Willem-Paul Brinkman, Nick Fine, and Robert M Hierons. Measuring personality from keyboard and mouse use. In Proceedings of the 15th European conference on Cognitive ergonomics: the ergonomics of cool interaction. New York, NY, USA, January 2008. ACM.

[5]

Jungwook Rhim, Jiwon Kim, and Gahgene Gweon. Using geometric features of drag-and-drop trajectories to understand students' learning. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems, volume 19, 1–14. New York, NY, USA, April 2023. ACM. URL: https://dl.acm.org/doi/10.1145/3544548.3581143.

[6]

Masud Karim and Md Hasanuzzaman. A study on mouse movement features to identify user. Sci. Res. J., 08(04):77–82, April 2020.

[7]

Fabian Monrose and Aviel D Rubin. Keystroke dynamics as a biometric for authentication. Future Gener. Comput. Syst., 16(4):351–359, February 2000.

[8]

Dirk U Wulff, Pascal J Kieslich, Felix Henninger, Jonas M B Haslbeck, and Michael Schulte-Mecklenbeck. Movement tracking of psychological processes: a tutorial using mousetrap. Behav. Res. Methods, 57(11):307, October 2025.

[9]

Guillermo Dylan Carvajal-Aza, Alejandro Alvarez-Varela, Javier De Andres, Martin Gonzalez-Rodriguez, Daniel Fernandez-Lanvin, and Mercedes Paino. Pywib: a python library for a multi-modal approach to web interaction behavior analysis. In Proceedings of the 2026 IARIA Annual Congress on Frontiers in Science, Technology, Services, and Applications (IARIA Congress 2026), 103–108. Nice, France, 2026. IARIA Press. URL: https://www.thinkmind.org/library/IARIA_CONGRESS/IARIA_Congress_2026/iaria_congress_2026_1_170_50103.html.

[10]

Martin Schoemann, Malte Lüken, Tobias Grage, Pascal J Kieslich, and Stefan Scherbaum. Validating mouse-tracking: how design factors influence action dynamics in intertemporal decision making. Behav. Res. Methods, 51(5):2356–2377, October 2019.

[11]

Eduard Kuric, Peter Demcak, Matus Krajcovic, and Peter Nemcek. Is mouse dynamics information credible for user behavior research? an empirical investigation. Comput. Stand. Interfaces, 90(103849):103849, August 2024.

[12] (1,2)

Pascal J. Kieslich, Felix Henninger, Dirk U. Wulff, Jonas M. B. Haslbeck, and Michael Schulte-Mecklenbeck. Mouse-tracking: a practical guide to implementation and analysis. In A Handbook of Process Tracing Methods, pages 20. Routledge, 2nd edition edition, 2019. URL: https://www.taylorfrancis.com/chapters/edit/10.4324/9781315160559-9/mouse-tracking-pascal-kieslich-felix-henninger-dirk-wulff-jonas-haslbeck-michael-schulte-mecklenbeck.

[13]

Christian O'Reilly and Réjean Plamondon. Can computer mice be used as low-cost devices for the acquisition of planar human movement velocity signals? Behav. Res. Methods, 43(1):229–238, March 2011. URL: https://link.springer.com/article/10.3758/s13428-010-0030-3#notes.

[14]

Beatriz Pariente-Martinez, Martin Gonzalez-Rodriguez, Daniel Fernandez-Lanvin, and Javier De Andres-Suarez. Measuring the role of age in user performance during interaction with computers. Univers. Access Inf. Soc., 15(2):237–247, June 2016. URL: https://link.springer.com/article/10.1007/s10209-014-0388-6.

[15]

Clayton Epp, Michael Lippold, and Regan L Mandryk. Identifying emotional states using keystroke dynamics. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. New York, NY, USA, May 2011. ACM.

[16]

Preeti Khanna and M Sasikumar. Recognising emotions from keyboard stroke pattern. Int. J. Comput. Appl., 11(9):1–5, December 2010.

[17]

Lisa M Vizer, Lina Zhou, and Andrew Sears. Automated stress detection using keystroke and linguistic features: an exploratory study. Int. J. Hum. Comput. Stud., 67(10):870–886, October 2009.

[18]

A F M Nazmul Haque Nahin, Jawad Mohammad Alam, Hasan Mahmud, and Kamrul Hasan. Identifying emotion by keystroke dynamics and text pattern analysis. Behav. Inf. Technol., 33(9):987–996, September 2014.

[19]

Maarten Dijkstra. The diagnosis of self-efficacy using mouse and keyboard input. PhD thesis, Utrecht University, 2013.