- 1Department of Sports Sciences and Physical Education, Instituto Politécnico de Bragança, Bragança, Portugal
- 2Department of Physical Education, Sport and Human Movement, Universidad Autónoma de Madrid (UAM), Ciudad Universitaria de Cantoblanco, Madrid, Spain
- 3Research Centre for Active Living and Wellbeing (Livewell), Instituto Politécnico de Bragança, Bragança, Portugal
- 4Department of Sports Sciences, Polytechnic of Guarda, Guarda, Portugal
- 5Department of Sports Sciences, Polytechnic of Cávado and Ave, Guimarães, Portugal
- 6SPRINT—Sport Physical Activity and Health Research & Innovation Center, Guarda, Portugal
- 7Research Center in Sports Sciences, Health Sciences and Human Development (CIDESD), Covilhã, Portugal
- 8CI-ISCE, Instituto Superior de Ciências Educativas do Douro (ISCE Douro), Penafiel, Portugal
- 9Department of Sports Sciences, Instituto Politécnico de Bragança, Bragança, Portugal
- 10Department of Physical Education, Universidade Federal de Viçosa, Viçosa, Brazil
- 11School of Health Sciences and Physiotherapy, University of Notre Dame Australia, Sydney, NSW, Australia
- 12Biosciences Higher School of Elvas, Polytechnic Institute of Portalegre, Portalegre, Portugal;
- 13Life Quality Research Centre (CIEQV), Portalegre, Portugal
- 14Department of Sports Sciences, University of Beira Interior, Covilhã, Portugal
- 15Department of Sports Sciences, University of Trás-os-Montes e Alto Douro, Vila Real, Portugal
- 16Centro de Investigação em Educação Básica (CIEB), Instituto Politécnico de Bragança, Bragança, Portugal
Introduction: The relationship between physical activity and anxiety among students has been extensively studied, with research highlighting the protective effects of physical activity on mental well-being.
Methods: This article synthesizes existing literature on the topic and presents a novel analysis of pre-exam anxiety rates among physically inactive high school students from 56 countries. Using data from the Programme for International Student Assessment (PISA) 2018, a hierarchical clustering method was applied to identify four clusters based on stratified country groups by the students' pre-exam anxiety levels.
Results: The results indicated five clusters for low physically active students (three with higher anxiety rates and two with lower levels of the condition) and four clusters for the low physically active individuals (two for higher anxiety rates and two for lower levels). Furthermore, the hierarchical model worked with good precision in the clustering task. In conclusion, considering the low physically active students, Brazil (82%) and the Dominican Republic (81%) recorded the highest pre-exam anxiety levels, while the Czech Republic (35%) had the lowest. Among the physically active students, Malaysia (82%), Brazil (81%), and Costa Rica (81%) recorded the highest anxiety levels, whereas again, the Czech Republic (35%) had the lowest.
Discussion: These findings emphasize that although physical activity generally relates to reduced anxiety, this association varies across cultural and educational contexts.
1 Introduction
The relationship between anxiety and physical activity has been the subject of extensive research, with numerous studies highlighting the interplay between these two factors (1–6). To this end, the current evidence has consistently demonstrated the beneficial effects of physical activity on reducing symptoms of anxiety and improving mental well-being in various populations (7–10). A meta-analysis by Rebar et al. (11) emphasized the antidepressive and anxiolytic effects of physical activity, particularly in non-clinical adult populations.
The impact of physical activity on anxiety has also been studied in specific populations, such as students, demonstrating a negative relationship between physical activity and anxiety among secondary school students, indicating the potential benefits of a physically active lifestyle for the students' mental health (12). From a psychological perspective, Kayani et al. (13) suggested that the relationship between physical activity and academic anxiety is mediated by psychosocial factors, highlighting the complex interplay between these variables. Even with this complexity in mind, the prevalence of physical inactivity and anxiety among students still has significant implications for public health, mental well-being, and academic performance (13–15), and it has aroused interest in this field of research. As an example of this, Tabor et al. (16) investigated the negative relationship between smartphone usage and physical inactivity, emphasizing the importance of physical activity in managing anxiety (17). Moreover, Chao et al. (65) found that higher levels of physical activity were associated with lower risks of experiencing anxiety symptoms among Chinese college students, highlighting the global relevance of this relationship. Additionally, Wiet et al. (18) inferred from their study that physical activity is more effective than no treatment and as effective as traditional forms of treatment, including cognitive therapy and antidepressant medication, in addressing anxiety (19, 20).
In support and affirming of the evidence, the Association of Southeast Asian Nations (ASEAN) region has highlighted that the prevalence of anxiety among students has been linked to lifestyle factors, including physical inactivity and sedentary behavior (21). This link to lifestyle factors underscores the need to address not only the psychological aspects but also the lifestyle correlates of anxiety among students. The prevalence of physical inactivity and anxiety among students has been studied in various contexts, including during the COVID-19 pandemic, where the incidence of anxiety has been found to exceed that of the general population significantly (22, 23). These findings emphasize the need to understand the interplay between environmental, societal, and individual factors contributing to physical inactivity and anxiety among students. The research gap in the existing literature is evident in the limited attention given to physically inactive students from countries across all continents regarding their anxiety rates. While numerous studies have explored the relationship between physical activity and anxiety among students in specific regions or cultural contexts (24), there is a lack of comprehensive research focusing specifically on physically inactive students on a global scale. The existing body of research tends to focus on active populations or localized settings, leaving a crucial need for broader, more inclusive studies that address the unique experiences and challenges faced by inactive students worldwide (1, 2, 14, 16). This gap underscores the importance of understanding how inactivity influences mental health across diverse cultural, social, and geographical landscapes.
Identifying countries with higher rates of physical inactivity and anxiety among students is crucial for targeting vulnerable populations and developing effective interventions to promote physical activity and prevent anxiety-related issues (25). By focusing on these high-risk groups, we can develop more tailored approaches to safeguard students' mental health and foster academic success. In this context, employing methods that yield precise, actionable insights is particularly valuable, as they enable the creation of time-efficient interventions that can mitigate anxiety and support well-being. This study, therefore, implements a hierarchical clustering method to categorize countries based on students' pre-exam anxiety levels, specifically distinguishing between two subgroups: physically active and inactive high school students.
2 Methodology
2.1 Participants
Data from pre-exam anxiety levels of 600,000 scholar students, with an average age of 15 years, from 56 countries were recorded. The dataset was obtained from the Program for International Student Assessment (PISA) 2018 study (26). This initiative evaluated the ability of 15-year-old students to use their reading, mathematics, and scientific knowledge to meet real-life challenges. Therefore, the PISA also considered psychometric factors in their data collection (26, 27). Additionally, we included in the analysis the variables related to pre-exam anxiety levels and habitual physical activity classification in these students. We included the dataset containing percentual anxiety rates among students in each of the 56 countries by physical activity status: low physical activity, those students who do not engage in any regular physical activity, and high physical activity, those who regularly engage in moderate to vigorous physical activities. The sponsors for the data collection also included only anxiety and physical activity levels in subjects who reported feeling well-prepared for their exams to ensure that academic preparation was not a weighted influencing factor (23, 26). The dichotomous grouping (low vs. high physical activity) was guided by PISA's operational definition and common classifications in public health literature.
2.2 Data preparation and preprocessing
To cluster the adolescent's pre-exam anxiety levels by their physical activity levels, we implemented hierarchical clustering (HC), which is an unsupervised machine learning method that can identify patterns of dominance between factors and, thus, determine some outcome (dependent variable) of interest, and an independent variable (explanatory variable) (28). This algorithm is recognized to be useful in identifying unseen or without pre-defined categories present in a dataset. For this purpose, the HC works by merging smaller clusters into larger ones and splitting the larger ones into smaller ones; this method is considered an agglomerative approach (28, 29). This way, the data were prepared considering that the pre-exam anxiety levels were encoded in a numeric and continuous variable as the dependent variable (target) and the countries (independent variable) as the categorical variable. Each observation representing anxiety by its respective country was treated as an individual point, thus allowing the model to define these points in each cluster as more representative (29). The whole process was repeated two times for the anxiety levels by low or high physical activity levels; thus, two data frames were created: 1° [countries (independent variable)—pre-exam anxiety levels for low physical activity levels (dependent variable)] and 2° [countries (independent variable)—pre-exam anxiety levels for high physical activity levels (dependent variable)].
2.3 Hierarchical clustering algorithm implementation
To cluster the pre-exam anxiety levels based on the countries, the HC algorithm calculates Euclidean distance, which is basically the distance in multiple pairwise comparisons between all countries simultaneously (29). For better comprehension, the Euclidean distance is expressed in the following equation:
where:
Aix_and Bix are the values of the i-th feature for countries A and B, respectively.
n is the number of features [e.g., pre-exam anxiety level in the present study (it can be more than one feature if applicable)].
The result gives the straight-line distance between countries A and B in a multidimensional feature space.
After applying the HC, following the review of clustering guidelines suggested by Gao et al. (28) to define the best number of clusters, we followed three sequential steps; first, building a dendrogram with the Euclidean distance values that allowed the visualization of all clusters and tracing of a horizontal line intersecting with the y-axis to define the most relevant number of clusters or those that comported the smaller clusters and split larger clusters in the same time; second, using the silhouette score to validate the ideal number of clusters (30); and third, evaluating the intra- and inter-dispersion of the chosen number of clusters with three metrics, i.e., within-cluster sum of squares (WCSS), between-cluster sum of squares (BCSS), and BCSS/WCSS ratio (31). Each of the prior steps is described below.
2.4 Performance evaluation
2.4.1 Silhouette score
The silhouette score is a metric regarding the similarity level of a point with its cluster when fitting the comparison with other clusters, giving a notion of the internal cohesion and separation between clusters (30). This metric has a threshold of −1,1. To evaluate the goodness of the silhouette score, we considered the recommendations of Milligan and Cooper (32) that suggest a threshold of at least 0.5 or higher indicates a good clustering task, with a higher coefficient as the best number of clusters. For better comprehension, the silhouette score s(i) is shown in the following equation:
where:
a(i) is the average distance between point i and all other points in the same cluster.
b(i) is the average distance between point i and all the points in the nearest cluster (the second closest cluster to which the point does not belong).
2.4.2 Within-cluster sum of squares
The WCSS is the metric of intra-cluster variability, which calculates the square sum of the distances between points within their proper cluster and in relation to their centroid. The smaller the WCSS, the more approximated the points to the centroid of a cluster (31). The WCSS is expressed in the following equation:
where:
K is the total number of clusters.
Ck is the set of indices of the data points that belong to cluster k.
xi is the feature vector of data point i.
μk is the feature vector of the centroid of cluster k.
∥xi−μk∥² is the squared Euclidean distance between data point i and the centroid of cluster k.
∑i∈Ck is the summation over all data points i that belong to cluster k.
∑k = 1 K is the summation over all clusters k from 1 to K.
In addition, to make the within-cluster approximations more interpretable, we divided the WCSS by the number of points (in our case, 56 countries), and thus we obtained the average square distance (31), as follows:
After this, we calculated the square root of the average square distance, and we reobtained the percentual WCSS (31), which became fully interpretable in this context, better visualized in the following equation:
2.4.3 Between-cluster sum of squares
BCSS is a metric that measures the sum of the distances between the center of each cluster and the global centroid, weighted by the number of points in each cluster. Thus, BCSS measures between-cluster variation, or it gives the notion about the distance of each cluster centroid from another. The higher the BCSS score, the better separated the clusters are. In practice, the BCSS isolated is very valuable to understanding the level of separation of the clusters, but it also cannot isolate or evaluate the overall clustering quality, which is one more important step of the clustering (31). The BCSS equation is defined below:
As in WCSS, we followed some steps to make the index more interpretable. For this purpose, we normalized the BCSS by the initial number of selected clusters, having the average BCSS per cluster (31), better visualized in the equation:
After this, we calculated the proportion of variability explained by the clustering by dividing the BCSS by the total sum of squares (TSS, the product of BCSS + WCSS). The higher the explained variability (0%–100%), the greater the HC capturing the variability within the data and inserting the points into the correct cluster (31). This is better explained by the following equation:
The BCSS/WCSS ratio is applied to measure the relative separation between clusters in relation to the internal clustering comparison. This ratio completes the deficiencies of only using BCSS or WCSS isolated helping to holistically evaluate the quality of the clusters, because it can compare the variance between and within the clusters. This metric is more comprehensive and indicates whether the clusters are well-separated relative to the compactness of internal clusters. If a positive ratio is found, it can be considered that the HC is working well in separating the clusters and gives more confidence for the outputs (31). The BCSS/WCSS ratio can be understood by the following equation:
2.5 Statistical analysis
Since we had no access to the raw dataset, we assessed the prior calculation chi-square of two simple proportions (χ2) and its respective outputs (degrees of freedom, standard error of the mean, and p-values for a 95% confidence interval), already present in the Organisation for Economic Co-operation and Development web page (29). For this purpose, after the final fitted HC outputs, we reported the χ2 statistics (26). In addition, following the guidelines of The British Medical Journal (27), we used the available mean difference of the average percentual values for each country divided by the standard error of the difference: , thus obtaining the threshold corresponding to a difference above three standard deviations. In practical terms, a 99% confidence interval (p < 0.001) to reject the null hypothesis in which the two country means are equal (27, 28). The 20% y-axis threshold for cluster identification in the dendrogram was chosen based on heuristic precedent and previous recommendations for interpretability in similar large-scale clustering tasks (28). To test the robustness of this threshold, we performed a sensitivity analysis using alternate cutoffs (15% and 25%), which produced similar cluster compositions, validating the 20% choice.
3 Results
The HC algorithm identified two major clusters with subdivisions: first, five clusters [two clusters with high (H-1 and H-2) and three clusters with low anxiety rates (L-1, L-2, and L-3) for the low physically active students], and second, four clusters [two clusters with high (H-1 and H-2) and three clusters with low anxiety rates (L-1, L-2, and L-3) for the low physically active students]. The results of the analysis acknowledging low and highly physically active students and the algorithm performance after being tested by the evaluation metrics are described step-by-step below.
3.1 Students with low physical activity
Figure 1 shows the results of the HC of anxiety levels among the 56 investigated countries considering the students classified with low anxiety levels. Following the step-by-step determination within the methods, the better number of clusters was considered when the horizontal lines intersected at 20% distance within the y-axis, followed by aggregation of five principal clusters, as observed in the red dashed line with the intersection with the five clusters' vertical lines. The two clusters in the orange line have the highest pre-exam average anxiety levels (H-1 = 67%, H-2 = 78%), and the three clusters in the green lines have lower average anxiety levels (L-1 = 41%, L-2 = 52%, L-3 = 60%). The height of the horizontal line of the clusters indicates the distance between the others; otherwise, there is a closed level of similarity between small clusters within the principal cluster. The best silhouette score (0.60) was in a combination of five clusters, considering a good number of clusters, WCSS = 309.27, with an average square distance of 5.52 for WCSS and a percentual average square distance of 2.35% indicating good compactness within the clusters, considering the range of 33%–82% of anxiety among the students. Furthermore, the BCSS analysis presents an absolute value of 1,367.33, with 96% of the variability explained by the clustering, showing very high precision in separating the clusters. Finally, the BCSS/WCSS ratio was positive (22.10), indicating good separation capacity between clusters compared with the variability within clusters.

Figure 1. Dendrogram of the clustering for the pre-exam anxiety levels for high physical activity students across the countries. PA, physical activity. H-1 and H-2, clusters with the highest anxiety levels. L-1, L-2, and L-3, clusters with the lowest anxiety levels.
Table 1 shows the pre-exam anxiety percentages for each country after HC results for the low physically active students. The clusters H-1 (67%) and H-2 (78%) presented higher pre-exam anxiety levels in the low physical activity students. Therefore, Brazil [H-2 (82%)] and the Dominican Republic [H-2 (81%)] had the most anxious pre-exam students. L-1 (41%), L-2 (52%), and L-3 (60%) represented the cluster with the smaller mean percentage of pre-exam anxiety, and the Czech Republic [L-1 (35%)] had less anxious students in the pre-exam moment. For students with low physical activity, L-1 (67%) and L-2 (78%) clusters were the most affected. It was perceptive that there was no predominance of a unique continent within the selected clusters.
3.2 High physical activity level students
Figure 2 shows the results of the pre-exam anxiety levels among the 56 countries adjusted for the students with satisfactory physical activity levels. The better number of clusters was four, also reaching this performance when the horizontal line intersected 20% of the distance in the y-axis of the dendrogram, as observed through the dashed line intersecting with four vertical lines (four principal clusters). The two clusters with orange lines have the lowest pre-exam anxiety levels (L-1 = 53%, L-2 = 43%), and the clusters with green lines have higher pre-exam anxiety levels (L-1 = 77%, L-2 = 64%). The dendrogram for highly physically active students showed good similarity between the small clusters originating from the principal clusters. The silhouette method also had a good score (0.56), indicating that the clusters were also well separated for this analysis, followed by WCSS = 632.80, with an average square distance of 5.52 for WCSS, and a percentual average square distance of 11.3%, indicating satisfactory compactness within clusters considering the anxiety rate range of 33%–82% among the students. The BCCS results (7,079.18) also explained the variability between clusters when separating clusters (92%). The BCSS/WCSS ratio was also positive (11.18), showing that the clusters were also well-separated from the others when considering their internal variability.

Figure 2. Dendrogram of the clustering for the pre-exam anxiety levels for high physical activity students across the countries. PA, physical activity. L-1 and L-2, clusters with the lowest anxiety levels. H-1 and H-2, clusters with the highest anxiety levels.
Table 2 shows the pre-exam anxiety percentages by country after the HC application, considering the students' satisfactory physical activity levels. The L-1 (53%) and L-2 (43%) clusters exposed the lowest pre-exam anxiety levels. Switzerland had the lowest anxiety levels (33%) within the L-2 cluster. In contrast, the H-1 (77%) and H-2 (64%) clusters had the highest anxiety rates. Malaysia (82%), followed by Brazil (81%) and Costa Rica (81%), had the highest rates of anxiety within the H-1 cluster, and the Czech Republic (35%) had lower rates of anxiety among the physically active students. Considering physically active students, the H-1 (77%) and H-2 (64%) clusters identified the students who were more impacted by elevated rates of anxiety before their scholar examination. Like the analysis enrolling the physically inactive students, the clusters regarding the individuals in low physical activity levels also did not present a predominance of continents within the final selection of clusters.
Table 3 shows only the countries with significant mean percentual differences when comparing students with low- and high physical activity levels. The χ2 statistics calculated a priori with the raw data in the PISA study showed no differences between physical activity groups when considering the total number of observations (full sample) included in the study. However, when individually analyzing the differences in the percentual of anxiety by groups and considering the cutoff of Z ≥ 1.96, there were some countries with beneficial statistically significant reductions in the pre-exam anxiety levels, p < 0.05 [Austria (−7), Belgium (−8), Chile (−8), France (−5), Germany (−2), Greece (−7), Hungary (−7), Israel (−9), Korea (−5), Mexico (−7), Turkey (−5), United States (−9%), Croatia (−9%)]. There was only an exception for Russia (+11%) and the United Arab Emirates (+4%), which increased their levels of anxiety as the participants were highly physically active. Furthermore, the average of all countries was a significant average percentual change (−3%, p < 0.01), showing that the physical activity status was important to reduce pre-exam anxiety if the students were prepared for the exam. Finally, it was notable that those countries that benefited from a physically active lifestyle were those which were framed in clusters with the lowest rates [L = 12 (67%) vs. H = 3 (23%)] when the students were in low physical activity levels, or apparently, a physical activity lifestyle was more effective in reducing the levels of anxiety in those countries with prior reduce rates of the outcome than in those countries with the highest rates.
4 Discussion
The present study sought to identify patterns of pre-exam anxiety among high school students, distinguishing between those who engage in moderate or vigorous physical activity and those who are physically inactive. The results showed that countries with a higher incidence of physically inactive students generally exhibited higher levels of pre-exam anxiety compared with their physically active counterparts. This finding reinforces the extensive literature associating regular physical activity with psychological benefits, including the reduction of anxiety and stress symptoms.
Initially, in recent years, the practice of physical activity has been widely studied as a protective factor for mental health, particularly concerning anxiety (33, 34). Studies indicate that regular physical exercise can act as a modulator of the central nervous system, reducing cortisol levels, a hormone associated with stress (35–37), and increasing the release of neurotransmitters such as endorphins and serotonin, which promote feelings of well-being (38, 39). Initially, in recent years, the practice of physical activity has been widely studied as a protective factor for mental health, particularly anxiety (33, 34). Studies suggest that regular physical exercise can act as a modulator of the central nervous system, reducing cortisol levels, a hormone associated with stress (12, 36), and increasing the release of neurotransmitters such as endorphins and serotonin, which promote feelings of well-being (38, 40). These mechanisms partially explain why physically active students exhibit lower levels of anxiety, as evidenced by the results of the present study. However, it is important to note that, despite a general trend of lower anxiety levels among physically active individuals, this relationship was not universally observed across all samples. This suggests that, while physical activity is beneficial, other factors, such as the intensity of academic stress and expectations surrounding academic performance, may influence anxiety levels (41). Therefore, in such cases, exercise alone may not be sufficient to fully mitigate the impact of academic pressure on students' mental health. Emerging neuroimaging studies provide further insight into the relationship between physical activity and anxiety. Exercise has been shown to influence amygdala reactivity and prefrontal cortex function, enhancing emotional regulation and resilience.
Furthermore, it is plausible that the beneficial impact of physical activity on reducing anxiety is influenced by variables such as the type, frequency, and intensity of the exercise performed (42, 43). Generally, engaging in physical exercise, regardless of its intensity—moderate or high—is widely recognized as a contributing factor to decreased anxiety (44, 45). However, in highly competitive contexts, physical activity can, paradoxically, exacerbate anxiety levels (18, 46–48). In this sense, exercises conducted in non-competitive environments tend to be more effective in mitigating anxiety levels, while activities in competitive situations can intensify stress, especially in individuals who are already under high pressure (48, 49). The consistently low anxiety levels reported by Czech students, regardless of physical activity status, suggest that cultural and educational factors may play a protective role. The Czech education system is characterized by reduced high-stakes testing pressure compared with other countries, which may lower exam-related stress (50). Additionally, cultural attitudes toward well-being and academic resilience may buffer anxiety (51). In countries such as Brazil or Malaysia, the intensity of entrance examinations and competitive academic environments may exacerbate anxiety (23). In contrast, Scandinavian or Central European education systems often emphasize holistic development over performance metrics, potentially explaining the lower anxiety levels reported (52). In countries such as Costa Rica or the Dominican Republic, scalable community-based physical activity programs could be integrated into school curricula, emphasizing inclusive participation over performance (53, 54). Mental health literacy campaigns adapted to cultural norms could also help destigmatize anxiety and promote help-seeking behaviors (55). Thus, the variability observed in anxiety levels among physically active students may be associated not only with the types of exercise but also with the context in which they are performed, as well as the level of stress to which students are exposed.
Physically active students in countries such as Russia and the United Arab Emirates (UAE) often experience high anxiety due to academic and cultural pressures, despite the mental health benefits of exercise. Studies show elevated anxiety among UAE students, especially females during the COVID-19 pandemic (56), and among Russian medical students facing intense academic demands (57), where in these contexts, physical activity might be associated with performance pressure (e.g., competitive sports). While physical activity generally supports mental health, it may not offset anxiety when institutional stress and mental health stigma are present (39, 58–60). Regarding physically inactive students, the higher levels of anxiety observed in the study reinforce the literature highlighting the mental health risks of a sedentary lifestyle, especially among adolescents. Various studies demonstrate that sedentary behavior is associated with compromised mental health (61–64). Additionally, the lack of physical activity can significantly contribute to the worsening of anxiety, as sedentary individuals often have greater difficulty coping with stress and pressure situations (64). The absence of exercise can negatively affect emotional well-being, reducing the ability to face daily challenges, such as those related to the academic environment, which ultimately intensifies anxiety, especially during peak demand periods such as exams (61, 62).
5 Practical applications and limitations
Despite its promising findings, this study has some limitations that should be considered. First, the generalizability of the results may be restricted by the data source used, as the sample is limited to students who participated in the PISA study, which may not adequately represent all high school students in a global context. Moreover, the dataset considered the average of the percentual values of anxiety for each country, which could lose an essential variability component within each country, that could improve the clustering breakdown. Additionally, the study's focus on 15-year-old students may not encompass the full diversity of age groups and educational environments among high school students. It is also important to note that self-reported data may have introduced response biases, as the participants themselves assessed the levels of physical activity and anxiety. These biases may inflate the correlation between the two variables. The sample was selected based on its scope and standardization; PISA 2018 includes a broad spectrum of countries with consistent measures across multiple domains. However, this selection may not fully capture nuances in less-represented regions or local socioeconomic disparities, potentially limiting the generalizability of findings to underrepresent cultural or educational systems.
Although the study revealed significant associations between physical activity and anxiety levels, it is crucial to recognize that reducing anxiety through exercise should be understood as part of a broader approach to promoting mental health. Interventions that focus exclusively on physical activity may not be sufficient to effectively address the complexity of factors influencing pre-exam anxiety, especially in contexts where academic stress is high and emotional support is limited. Therefore, it is essential that physical activity is integrated with other forms of psychosocial support, such as counseling and stress management, in order to enhance the beneficial effects on students' mental health. The outputs of this study can be used by policymakers from the most affected countries by the issues and consequences of anxiety to the scholarly students' mental health in building educational projects and meetings with parents and teachers, which helps the scholarly community to be more conscious and empowered to prevent long-term anxiety levels and ensure good academic development for the most vulnerable students. While general recommendations are important, we recognize the need for context-specific strategies. For example, in Brazil—one of the countries with the highest anxiety levels—policymakers could consider mandatory inclusion of physical education (PE) at all high school levels, integrated with mindfulness and stress management curricula. Collaboration between schools and mental health professionals may also help develop anxiety screening protocols and physical activity interventions tailored to students' needs. For future research, similar clustering methods can be implemented in case studies in different realities, thus providing the opportunity to make rich insights when comparing the findings across the diversity of socioeconomic and demographic factors among students. The employment of similar models in other age groups, such as university students, can also add to the particularities of anxiety in different academic periods of a person’s life. Finally, longitudinal approaches incorporating time series analysis plus clustering can be very explanative of long-term changes in anxiety levels among students. Future studies should also consider incorporating objective measures (e.g., accelerometers and validated clinical anxiety inventories) to validate these findings.
6 Conclusions
We conclude that the hierarchical clustering presented good performance in highlighting the most anxious countries in pre-exam, adjusting the clustering by physical activity groups. The countries with respective low physically active students were clustered within five clusters, in which Brazil (82%) and the Dominican Republic (81%) had the most anxious pre-exam students and the Czech Republic (35%) had less anxious students at the pre-exam moment. Regarding the physically active students, these countries were grouped within four clusters, where Malaysia (82%), Brazil (81%), and Costa Rica (81%) were the most anxious countries and the Czech Republic (35%) had the lower rates of anxiety among the physically active students.
Data availability statement
Publicly available datasets were analyzed in this study. This data can be found here: https://www.oecd.org/en/data/datasets/pisa-2018-database.html#data.
Ethics statement
Ethical approval was not required for the study involving humans in accordance with the local legislation and institutional requirements. Written informed consent to participate in this study was not required from the participants or the participants' legal guardians/next of kin in accordance with the national legislation and the institutional requirements.
Author contributions
SE: Writing – original draft, Writing – review & editing. JT: Writing – original draft, Writing – review & editing. PF: Writing – original draft, Writing – review & editing. LL: Writing – original draft, Writing – review & editing. AS: Writing – original draft. LB: Writing – original draft, Writing – review & editing. RF: Writing – original draft. PA: Writing – original draft. PV: Writing – original draft. AM: Writing – original draft, Writing – review & editing.
Funding
The authors declare that financial support was received for the research and/or publication of this article. This research was funded by the Foundation for Science and Technology, IP, under grant numbers UID/CED/04748/2020 and UID04045/2020.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher's note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. Ströhle A. Physical activity, exercise, depression and anxiety disorders. J Neural Transm. (2009) 116(6):777–84. doi: 10.1007/s00702-008-0092-x
2. Smits JAJ, Tart CD, Rosenfield D, Zvolensky MJ. The interplay between physical activity and anxiety sensitivity in fearful responding to carbon dioxide challenge. Psychosom Med. (2011) 73(6):498–503. doi: 10.1097/PSY.0b013e3182223b28
3. De Mello MT, Lemos V de A, Antunes HKM, Bittencourt L, Santos-Silva R, Tufik S. Relationship between physical activity and depression and anxiety symptoms: a population study. J Affect Disord. (2013)149(1):241–6 149(1):241–6. doi: 10.1016/j.jad.2013.01.035
4. Kandola A, Vancampfort D, Herring M, Rebar A, Hallgren M, Firth J, et al. Moving to beat anxiety: epidemiology and therapeutic issues with physical activity for anxiety. Curr Psychiatry Rep. (2018) 20(8):63. doi: 10.1007/s11920-018-0923-x
5. Schuch FB, Bulzing RA, Meyer J, Vancampfort D, Firth J, Stubbs B, et al. Associations of moderate to vigorous physical activity and sedentary behavior with depressive and anxiety symptoms in self-isolating people during the COVID-19 pandemic: a cross-sectional survey in Brazil. Psychiatry Res. (2020) 292:113339. doi: 10.1016/j.psychres.2020.113339
6. McCartan CJ, Yap J, Firth J, Stubbs B, Tully MA, Best P, et al. Factors that influence participation in physical activity for anxiety or depression: a synthesis of qualitative evidence. Cochrane Database Syst Rev. (2020) 2020(3):CD013547. doi: 10.1002/14651858.CD013547
7. Goodarzi S, Teymouri Athar MM, Beiky M, Fathi H, Nakhaee Z, Omran SP, et al. Effect of physical activity for reducing anxiety symptoms in older adults: a meta-analysis of randomized controlled trials. BMC Sports Sci Med Rehabil. (2024) 16(1):153. doi: 10.1186/s13102-024-00947-w
8. Mahindru A, Patil P, Agrawal V. Role of physical activity on mental health and well-being: a review. Cureus. (2023) 15(1):e33475. doi: 10.7759/cureus.33475
9. Singh S, Zhong S, Rogers K, Hachinski V, Frisbee S. Prioritizing determinants of cognitive function in healthy middle-aged and older adults: insights from a machine learning regression approach in the Canadian longitudinal study on aging. Front Public Health. (2023) 11:1290064. doi: 10.3389/fpubh.2023.1290064
10. Herbert C. Enhancing mental health, well-being and active lifestyles of university students by means of physical activity and exercise research programs. Front Public Health. (2022) 10:849093. doi: 10.3389/fpubh.2022.849093
11. Rebar AL, Stanton R, Geard D, Short C, Duncan MJ, Vandelanotte C. A meta-meta-analysis of the effect of physical activity on depression and anxiety in non-clinical adult populations. Health Psychol Rev. (2015) 9(3):366–78. doi: 10.1080/17437199.2015.1022901
12. Alghadir AH, Gabr SA, Al-Momani M, Al-Momani F. Moderate aerobic training modulates cytokines and cortisol profiles in older adults with cognitive abilities. Cytokine. (2021) 138:155373. doi: 10.1016/j.cyto.2020.155373
13. Kayani S, Wang J, Biasutti M, Zagalaz Sánchez ML, Kiyani T, Kayani S. Mechanism between physical activity and academic anxiety: evidence from Pakistan. Sustainability. (2020) 12(9):3595. doi: 10.3390/su12093595
14. Lowe PA. Cross-national comparisons between Canadian and US higher education students on a new, brief, multidimensional measure of test anxiety. J Psychoeduc Assess. (2021) 39(6):665–79. doi: 10.1177/07342829211016933
15. Richland LE, Naslund-Hadley E, Alonzo H, Lyons E, Vollman E. Teacher and students’ mathematics anxiety and achievement in a low-income national context. Mind Brain Educ. (2020) 14(4):400–14. doi: 10.1111/mbe.12253
16. Tabor A, Vollaard N, Keogh E, Eccleston C. Predicting the consequences of physical activity: an investigation into the relationship between anxiety sensitivity, interoceptive accuracy and action. PLoS One. (2019) 14(3):e0210853. doi: 10.1371/journal.pone.0210853
17. Smith-Ricketts J, Lepp A, Barkley JE. The negative relationship between objectively assessed physical activity and total smartphone usage: direct original research. Res Psychol Behav. (2022) 2(1). doi: 10.53520/rdpb2022.10747
18. Wilke J, Pfarr T, Möller MD. Even warriors can be scared: a survey assessing anxiety and coping skills in competitive CrossFit athletes. Int J Environ Res Public Health. (2020) 17(6):1874. doi: 10.3390/ijerph17061874
19. Wiet R, Lepp A, Barkley J. A preliminary assessment of the relationship between cellphone use and physical activity, sedentary behavior, anxiety, and academic performance in high school students: direct original research. Res Health Med. (2023) 3(1). doi: 10.53520/rdhs2023.10473
20. Knapen J, van de Vliet P, van Coppenolle H, David A, Peuskens J, Pieters G, et al. Comparison of changes in physical self-concept, global self-esteem, depression and anxiety following two different psychomotor therapy programs in nonpsychotic psychiatric inpatients. Psychother Psychosom. (2005) 74(6):353–61. doi: 10.1159/000087782
21. Peltzer K, Pengpid S. Leisure time physical inactivity and sedentary behaviour and lifestyle correlates among students aged 13–15 in the Association of Southeast Asian Nations (ASEAN) member states, 2007–2013. Int J Environ Res Public Health. (2016) 13(2):217. doi: 10.3390/ijerph13020217
22. Silva DR, Werneck AO, Malta DC, Souza-Júnior PRB, Azevedo LO, Barros MBA, et al. Incidence of physical inactivity and excessive screen time during the first wave of the COVID-19 pandemic in Brazil: what are the most affected population groups? Ann Epidemiol. (2021) 62:30–5. doi: 10.1016/j.annepidem.2021.05.001
23. Tan Y, Wu Z, Qu X, Liu Y, Peng L, Ge Y, et al. Influencing factors of international students’ anxiety under online learning during the COVID-19 pandemic: a cross-sectional study of 1,090 Chinese international students. Front Psychol. (2022) 13:860289. doi: 10.3389/fpsyg.2022.860289
24. Carter T, Pascoe M, Bastounis A, Morres ID, Callaghan P, Parker AG. The effect of physical activity on anxiety in children and young people: a systematic review and meta-analysis. J Affect Disord. (2021) 285:10–21. doi: 10.1016/j.jad.2021.02.026
25. Mendoza-Vasconez AS, Linke S, Muñoz M, Pekmezi D, Ainsworth C, Cano M, et al. Promoting physical activity among underserved populations. Transl J Am Coll Sports Med. (2016) 1(14):125. doi: 10.1249/TJX.0000000000000014
26. Ünlü A, Kasper D, Trendtel M, Schurig M. The OECD’s Programme for International Student Assessment (PISA) study: a review of its basic psychometric concepts. In: Spiliopoulou M, Schmidt-Thieme L, Janning R, editors. Data Analysis, Machine Learning and Knowledge Discovery. Cham: Springer International Publishing (2014). p. 417–25.
27. The BMJ, The BMJ: leading general medical journal. Research. Education. Comment. 2020. 5. Differences between Means: Type I and Type II Errors and Power, The BMJ. Available online at: https://www.bmj.com/about-bmj/resources-readers/publications/statistics-square-one/5-differences-between-means-type-i-an (Accessed May 8, 2025).
28. Gao CX, Dwyer D, Zhu Y, Smith CL, Du L, Filia KM, et al. An overview of clustering methods with guidelines for application in mental health research. Psychiatry Res. (2023) 327:115265. doi: 10.1016/j.psychres.2023.115265
29. Kaufman L, Rousseeuw PJ. Finding Groups in Data: An Introduction to Cluster Analysis. Hoboken, NJ: John Wiley & Sons (2009). p. 368.
30. Rousseeuw PJ. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J Comput Appl Math. (1987) 20:53–65. doi: 10.1016/0377-0427(87)90125-7
31. Caliński T, Harabasz J. A dendrite method for cluster analysis. Commun Stat. (1974) 3(1):1–27. doi: 10.1080/03610927408827101
32. Milligan GW, Cooper MC. An examination of procedures for determining the number of clusters in a data set. Psychometrika. (1985) 50(2):159–79. doi: 10.1007/BF02294245
33. Bonhauser M, Fernandez G, Püschel K, Yañez F, Montero J, Thompson B, et al. Improving physical fitness and emotional well-being in adolescents of low socioeconomic status in Chile: results of a school-based controlled trial. Health Promot Int. (2005) 20(2):113–22. doi: 10.1093/heapro/dah603
34. Gallego J, Aguilar-Parra JM, Cangas AJ, Langer ÁI, Mañas I. Effect of a mindfulness program on stress, anxiety and depression in university students. Span J Psychol. (2014) 17:E109. doi: 10.1017/sjp.2014.102
35. Forte P, Encarnação S, Monteiro AM, Teixeira JE, Hattabi S, Sortwell A, et al. A deep learning neural network to classify obesity risk in Portuguese adolescents based on physical fitness levels and body mass index percentiles: insights for national health policies. Behav Sci. (2023) 13(7):522. doi: 10.3390/bs13070522
36. Cornil A, De Coster A, Copinschi G, Franckson JRM. Effect of muscular exercise on the plasma level of cortisol in man. Acta Endocrinol. (1965) 48(1):163–8. doi: 10.1530/acta.0.0480163
37. Gashi AI, Zivkovic V, Gjorgoski I, Gontarev S, Azemi A. Regular physical activity may influence stress hormone cortisol in Wistar rats. J Phys Educ Sport. (2020) 20(1):138–41. doi: 10.7752/jpes.2020.01018
38. Weyerer S, Kupfer B. Physical exercise and psychological health. Sports Med. (1994) 17(2):108–16. doi: 10.2165/00007256-199417020-00003
39. Qin T, Chen P, Wang J, Dong J, Zhang K. Impact of physical activity on anxiety among university students: a moderated mediation model. Front Psychol. (2024) 15:1509201. doi: 10.3389/fpsyg.2024.1509
40. Short M, Martin K, Livingston L, Côté P. Physical activity, sedentary behaviour and symptoms of anxiety in post-secondary students: a cross-sectional study of two faculties. Psychiatry Res Commun. (2021) 1(1):100007. doi: 10.1016/j.psycom.2021.100007
41. Owens M, Stevenson J, Hadwin JA, Norgate R. Anxiety and depression in academic performance: an exploration of the mediating factors of worry and working memory. Sch Psychol Int. (2012) 33(4):433–49. doi: 10.1177/0143034311427433
42. Ji C, Yang J, Lin L, Chen S. Physical exercise ameliorates anxiety, depression and sleep quality in college students: experimental evidence from exercise intensity and frequency. Behav Sci. (2022) 12(3):61. doi: 10.3390/bs12030061
43. Pascoe M, Bailey AP, Craike M, Carter T, Patten R, Stepto N, et al. Physical activity and exercise in youth mental health promotion: a scoping review. BMJ Open Sport Exerc Med. (2020) 6(1):e000677. doi: 10.1136/bmjsem-2019-000677
44. Norris R, Carroll D, Cochrane R. The effects of physical activity and exercise training on psychological stress and well-being in an adolescent population. J Psychosom Res. (1992) 36(1):55–65. doi: 10.1016/0022-3999(92)90114-H
45. Guszkowska M. Effects of exercise on anxiety, depression and mood. Psychiatr Pol. (2004) 38(4):611–20.15518309
46. Mabweazara SZ, Leach L, Andrews BS. Predicting swimming performance using state anxiety. S Afr J Psychol. (2017) 47(1):110–20. doi: 10.1177/0081246316645060
47. Horikawa M, Yagi A. The relationships among trait anxiety, state anxiety and the goal performance of penalty shoot-out by university soccer players. PLoS One. (2012) 7(4):e35727. doi: 10.1371/journal.pone.0035727
48. Endo T, Sekiya H, Raima C. Psychological pressure on athletes during matches and practices. Asian J Sport Exerc Psychol. (2023) 3(3):161–70. doi: 10.1016/j.ajsep.2023.07.002
49. Lopes Dos Santos M, Uftring M, Stahl CA, Lockie RG, Alvar B, Mann JB, et al. Stress in academic and athletic performance in collegiate athletes: a narrative review of sources and monitoring strategies. Front Sports Act Living. (2020) 2:42. doi: 10.3389/fspor.2020.00042
50. Greger D, Walterová E. In pursuit of educational change: transformation of education in the Czech Republic. Orb Sch. (2018) 1(2):11–44. doi: 10.14712/23363177.2018.165
51. Tang L, Zhu X. Academic self-efficacy, grit, and teacher support as predictors of psychological well-being of Chinese EFL students. Front Psychol. (2024) 14:1332909. doi: 10.3389/fpsyg.2023.1332909
52. Grek S, Lawn M, Lingard B, Varjo J. North by northwest: quality assurance and evaluation processes in European education. J Educ Policy. (2009) 24(2):121–33. doi: 10.1080/02680930902733022
53. Wanis J. An examination of the factors that influence educational pursuits across different cultural groups: a literature review (Thesis). Midwestern University (2024). Available online at: https://midwestern.figshare.com/articles/thesis/An_Examination_of_The_Factors_That_Influence_Educational_Pursuits_Across_Different_Cultural_Groups_A_Literature_Review/27869226/1
54. Salam A, Yousuf R, Abu Bakar SM, Haque M. Stress among medical students in Malaysia: a systematic review of literatures. Int Med J. (2013) 20(6):649–55.
55. Resendiz E, Jáuregui A, Salvo D. Case study from Latin America: understanding the relationship between the built environment and physical activity in Latin American contexts. In: Siefken K, Ramirez Varela A, Waqanivalu T, Schulenkorf N, editors. Physical Activity in Low- and Middle-Income Countries. London: Routledge (2021).
56. Saddik B, Hussein A, Sharif-Askari FS, Kheder W, Temsah MH, Koutaich RA, et al. Increased levels of anxiety among medical and non-medical university students during the COVID-19 pandemic in the United Arab Emirates. Risk Manag Healthc Policy. (2020) 13:2395–406. doi: 10.2147/RMHP.S273333
57. Chumakov E, Petrova N, Mamatkhodjaeva T, Ventriglio A, Bhugra D. The impact of COVID-19: anxiety, depression, and wellbeing among medical students. Int J Soc Psychiatry. (2022) 68(6):1270–6. doi: 10.1177/00207640221121717
58. Santos GCJ, Rino MJ, Da Silva Lima VL, Santos J, A D, Silva Fidelis DE, et al. Physical activity and mental health in Brazilian university students: an analysis in different sexes during the COVID-19 pandemic. Biomed Hum Kinet. (2023) 15(1):113–20. doi: 10.2478/bhk-2023-0014
59. Santana EE, Neves LM, Souza KC, Mendes TB, Rossi FE, Silva AA, et al. Physically inactive undergraduate students exhibit more symptoms of anxiety, depression, and poor quality of life than physically active students. Int J Environ Res Public Health. (2023) 20(5):4494. doi: 10.3390/ijerph20054494
60. Souza KC, Mendes TB, Gomes TH, Silva AA, Nali LH, Bachi AL, et al. Medical students show lower physical activity levels and higher anxiety than physical education students: a cross-sectional study during the COVID-19 pandemic. Front Psychiatry. (2021) 12:804967. doi: 10.3389/fpsyt.2021.804967
61. Do YK, Shin E, Bautista MA, Foo K. The associations between self-reported sleep duration and adolescent health outcomes: what is the role of time spent on internet use? Sleep Med. (2013) 14(2):195–200. doi: 10.1016/j.sleep.2012.09.004
62. Asare M, Danquah SA. The relationship between physical activity, sedentary behaviour and mental health in Ghanaian adolescents. Child Adolesc Psychiatry Ment Health. (2015) 9(1):11. doi: 10.1186/s13034-015-0043-x
63. Cao H, Qian Q, Weng T, Yuan C, Sun Y, Wang H, et al. Screen time, physical activity and mental health among urban adolescents in China. Prev Med. (2011) 53(4):316–20. doi: 10.1016/j.ypmed.2011.09.002
64. Costa MP, Schmidt A, Vitorino PV, Corrêa KD. Physical inactivity and symptoms of depression, anxiety and stress in adolescent students. Acta Paul Enferm. (2021) 34:eAPE03364. doi: 10.37689/acta-ape/2021AO03364
Keywords: anxiousness, unsupervised machine learning, teens, healthy lifestyle, social protection
Citation: Encarnação S, Teixeira JE, Forte P, Leite LB, Sortwell A, Branquinho L, Ferraz R, Afonso P, Vaz P and Monteiro AM (2025) Hierarchical clustering of the pre-exam anxiety levels in physically inactive and active adolescent students from 56 countries: an observational study using PISA program data. Front. Sports Act. Living 7:1509959. doi: 10.3389/fspor.2025.1509959
Received: 11 October 2024; Accepted: 19 June 2025;
Published: 7 July 2025.
Edited by:
Louisa Rosemary Peralta, The University of Sydney, AustraliaReviewed by:
Eddy Noviana, Universitas Riau, IndonesiaRola Angga Lardika, Riau University, Indonesia
Copyright: © 2025 Encarnação, Teixeira, Forte, Leite, Sortwell, Branquinho, Ferraz, Afonso, Vaz and Monteiro. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Samuel Encarnação, c2FtdWVsMDEuZW5jYXJuYWNhb0BnbWFpbC5jb20=