1. Introduction
Education plays a fundamental role in the integral development of students, so much so that in some countries, such as Spain, legislation explicitly recognises the full development of the capabilities of each and every student as one of the objectives of the national education system (
Organic Law on Education 2006). Nonetheless, certain aspects inherent to the reality of the classroom environment hinder the achievement of this goal. One such aspect pertains to the diversity that currently prevails within classrooms, manifested in a variety of learning styles and paces among students, which may impede the adequate fulfilment of the academic needs of all students (
Fuentes et al. 2021). In particular, students exhibiting extreme learning paces tend to experience the greatest difficulties in such contexts (
Cabrera-Murcia 2007). Indeed, while students requiring additional time to assimilate the contents may find themselves unable to keep pace with the progression of the activities programmed by the teacher, those who advance rapidly risk insufficient intellectual stimulation. Consequently, feelings of frustration and demotivation may arise within both groups, which tend to adversely affect their academic performance. This could translate into a decrease in the academic achievement of the students who are lagging behind, presumably modest in itself, and a deterioration in the performance of the more advanced students, whose academic outcomes might otherwise be expected to be favourable.
The relevance of academic achievement as a measure of the impact of student diversity on educational outcomes has garnered increasing attention, not only within the educational sphere but also at the broader societal level. This growing interest is partly attributable to the recognition of academic performance as an indicator of the equity of an educational system, insomuch as it provides a means to assess the system’s effectiveness in addressing personal, familial, or social disparities among students (
Jurado de Los Santos et al. 2020;
OECD 2018). In this regard, the study of academic performance enables the evaluation of the extent to which an education system contributes to either mitigating or perpetuating existing inequalities within society.
Educational and social research, cognisant of this reality, has delved into the analysis of academic achievement and the identification of the variables that condition it (
Cabrera-Pérez 2016;
García-Martín and Cantón 2016;
Hellas et al. 2018;
Iyahyan and Düştegör 2020). In particular, considerable attention has been devoted to examining the factors influencing the academic performance of students situated at both the lower and upper ends of the achievement spectrum, owing to their respective degrees of vulnerability (
de la Orden and González 2005;
Garrido-Yserte et al. 2020). In the case of low-achieving students, academic difficulties are often exacerbated by socioeconomically disadvantaged family environments, which restrict access to essential resources and fail to provide the support and assistance necessary for the successful continuation of their academic trajectory (
Artunduaga 2024;
Fajardo-Bullón et al. 2017). Conversely, students who demonstrate high academic performance frequently face challenges of both an academic and an emotional nature. The most commonly reported issues are elevated levels of stress, self-imposed pressure and perfectionism, excessive academic competitiveness, and a lack of intellectual stimulation (
Almousa et al. 2022;
Helsper et al. 2025). Taken together, these observations underscore the imperative to study the specific needs of each student group in order to design and implement tailored educational measures that enhance their academic achievement.
In this context, the information provided by large-scale international educational assessments may be of considerable value. Such studies evaluate the competence levels of students from countries around the globe in one or more curricular areas at specific points in their academic trajectory. Among these studies, PISA (the Programme for International Student Assessment), developed by the Organisation for Economic Co-operation and Development (OECD), stands out. It aims to assess the ability of 15-year-old students to apply knowledge and skills in mathematics, science, and reading comprehension to real-life and everyday contexts (
OECD 2023). The PISA study has been conducted triennially since 2000, with the sole exception of PISA 2022, which took place four years after the previous cycle because of the global health crisis. In the 2022 edition, the most recent to date, approximately 690,000 students from 81 countries and economies participated, primarily from Europe, the Americas, Oceania, and Asia. In Spain, the number of participating students was 30,800, drawn from 966 educational institutions (
Ministry of Education, Vocational Training and Sports 2023;
OECD 2023).
Each PISA cycle focuses on one of the three assessed domains, which is subjected to a more in-depth evaluation than the other domains. This implies that students respond to a greater number of items related to the principal domain. Furthermore, additional results are provided, disaggregated by sub-competencies and cognitive processes, offering a detailed insight into students’ competency development in the area in question. In PISA 2022, the main domain assessed was mathematics, which enabled the evaluation of students’ performance in four mathematical content areas: change and relationships, quantity, space and shape, and uncertainty and data. Likewise, results were provided in relation to four cognitive processes: use of mathematical concepts, facts and procedures; formulation of mathematical situations; interpretation, application and evaluation of mathematical outcomes; and mathematical reasoning (
OECD 2023).
The PISA methodology includes the construction of a competence scale that allows for the classification of each student into a specific level, according to their skills and abilities in each assessed area. In mathematics, this scale comprises six levels, numbered from 1 to 6, where level 1 represents the lowest degree of competence, and level 6 represents the highest. Students at level 1 possess very basic mathematical skills that allow them to solve simple tasks in which information is presented clearly and explicitly and that require the application of very simple procedures. According to the PISA criteria, these students do not reach the minimum threshold for functional competence—set at level 2—required for full participation in today’s society. In PISA terminology, these students are referred to as low-performing students. At the other end of the spectrum, competence levels 5 and 6 encompass students who demonstrate a high degree of abstraction, creativity, and critical thinking skills in solving tasks of considerable complexity. Within the context of PISA, these students are termed top-performing students (
Ministry of Education, Vocational Training and Sports 2023;
OECD 2023). The distribution of students across performance levels varies significantly depending on the country in question. In the case of Spain, this distribution is notably uneven, as illustrated in
Table 1.
According to the preceding table, 23.54% of Spanish students are positioned at the lowest level of mathematical competence, while only 6.63% attain levels 5 or 6. Both figures are below the corresponding OECD averages, which indicate that 31% and 9% of students, respectively, fall within level 1 and levels 5 and 6 of mathematical competence (
OECD 2023).
In addition to assessing performance in the three subject areas, PISA provides a substantial amount of contextual information regarding the personal and educational backgrounds of participating students. This contextual data includes personal and sociodemographic characteristics, such as gender, month of birth, and students’ socio-economic and cultural status. It also encompasses academic variables such as grade repetition and attendance in early childhood education. Moreover, information about the schools that students attend is collected, such as type of ownership, total enrolment figures, and student–teacher ratios (
OECD 2023).
Over successive PISA cycles, this contextual information has been the focus of numerous secondary analyses aimed at identifying the background variables that influence student competence across the different assessed domains (
Frade-Martínez et al. 2024b). For instance,
Gamazo et al. (
2018) used PISA 2015 data to identify the factors associated with the competence levels of Spanish students. Their findings revealed that variables such as grade repetition and the grade in which students were enrolled were significantly associated with students’ levels of competence in mathematics, science, and reading. In mathematics, additional factors such as gender, immigrant status, and the number of school changes throughout a student’s academic trajectory also showed significant effects.
Frade-Martínez et al. (
2024a) investigated the factors affecting students’ mathematical competence using data from PISA 2015 and PISA 2018. Their analysis demonstrated that variables such as grade repetition, gender, and both individual and school-level socio-economic and cultural status were significantly related to mathematics performance in both cycles. Similarly,
Frade-Martínez et al. (
2024c) conducted a comparative study examining the contextual factors associated with competence among students in Spain and Ireland using PISA 2018 data. They found that socio-economic and cultural status, grade repetition, and age had significant impacts across all three assessed domains for students in both countries.
Molina-Muñoz et al. (
2023) reached similar conclusions when analysing the PISA 2018 data in order to identify the determinants of the mathematical competence of the Spanish students. More recently, the study by
Ortega-Rodríguez (
2025b) underscored the importance not only of individual students’ socio-economic and cultural status but also of the aggregate average status of the schools as predictors of mathematics competence in Spain. Other school environment variables that have been shown to influence Spanish students’ academic performance include classroom climate, school wellbeing, and experiences of bullying (
Ortega-Rodríguez 2025a). In Portugal,
Frade-Martínez et al. (
2025) found that students’ perceived feedback from teachers, the use of ICT both within and outside of school, and classroom climate were the only variables significantly associated with competence in mathematics, science, and reading.
The findings from these studies are highly relevant, as they shed light on the impact of contextual variables on the academic outcomes of an average student. However, such results may not be generalisable to students whose performance deviates substantially from the mean. These cases require specific analyses to identify the factors significantly associated with either low or high academic performance. In this regard,
Muelle (
2020) reported that both the socio-economic and cultural status of students’ family environments and that of their schools were the most impactful variables in determining the competence levels of low-performing Peruvian students across all three PISA domains. Additionally, other factors such as gender, grade repetition, and test anxiety were also found to be significantly related to low performance, albeit to a lesser degree. In the same vein,
Çoban and Kamiş (
2019) found higher levels of test anxiety among low-performing Turkish students in science, whereas higher socio-economic status, greater achievement motivation, and increased enjoyment of cooperation were associated with higher-performing students.
Nevertheless, in the context of Spanish education, studies specifically identifying the factors associated with particularly low or high levels of student performance remain scarce. This limitation represents a significant research gap that must be addressed, as it hinders the design and implementation of targeted measures aimed at fostering educational equity. Furthermore, it is especially pertinent to explore these factors using data from PISA 2022, given that this was the first edition conducted following the global health crisis caused by the COVID-19 pandemic—a circumstance that may have exacerbated pre-existing educational inequalities, affecting both low- and high-performing students in different ways.
In this context, the present study aims to identify and compare the variables that significantly influence the mathematical competence of two groups of Spanish students: those who exhibit the lowest level of competence and those who attain the highest levels of performance.
2. Materials and Methods
The data employed in this study correspond to the Spanish sample from PISA 2022, which comprises 30,800 15-year-old students. The sampling process followed a two-stage design: in the first stage, a number of schools were selected using systematic sampling with probabilities proportional to the estimated number of 15-year-old students per institution; in the second stage, random sampling was applied to select students from the previously chosen schools (
OECD 2024b).
Mathematical competence was considered as the dependent variable. Within the framework of PISA, this is measured by what are known as plausible values. These are derived by calculating a distribution of mathematically plausible proficiency scores that may be assumed for each student. This distribution is based on the student’s responses to the mathematics assessment, as well as various contextual variables related to their personal and educational background, such as gender and socio-economic and cultural status. The plausible values are random draws from this distribution. Since the 2015 edition of PISA, a total of ten plausible values have been generated per student. In order to facilitate interpretation, these values are scaled so that their mean and standard deviation are approximately 500 and 100 points, respectively (
OECD 2024b).
Two groups of variables were considered as predictors: on the one hand, those related to students’ personal and family backgrounds, and on the other, those describing characteristics of the educational institutions.
Table 2 lists the predictors used in the analyses, indicating the type of each variable and, where applicable, the possible values it may assume. The selection of these variables was informed by their established empirical relevance and statistically significant association with students’ mathematical competence, as consistently demonstrated in prior research utilising PISA data (e.g.,
Frade-Martínez et al. 2024c;
Molina-Muñoz et al. 2022,
2023;
Ortega-Rodríguez 2025b). Rather than pursuing an exhaustive inclusion of contextual variables, the study adopts a parsimonious modelling approach, concentrating specifically on those factors that have consistently exhibited significant relationships with the mathematical competence of Spanish students. This selective inclusion aims to enhance both the interpretability and analytical rigour of the model, whilst ensuring alignment with the existing empirical literature and structural particularities of the Spanish education system.
The independent variables include several indices calculated within the PISA framework, such as the students’ economic, social and cultural status index and the indices of responsibility for curriculum and resource allocation at the school level. The former, the economic, social, and cultural status (ESCS) index, is derived from parental educational attainment, parental occupational status, and home possessions. The values of this index are standardised so that the mean is 0 and the standard deviation is 1 across OECD countries as a whole.
The indices of responsibility for curriculum (IRCUR) and resources (IRRES) reflect the relative autonomy of schools in decision-making regarding curricular content and resource management, respectively, as compared with local, regional, or national authorities. Higher values on these indices denote greater decision-making authority vested in the schools themselves (
OECD 2024b).
For the analysis of the data, hierarchical or multilevel regression techniques were employed, the use of which is particularly appropriate in contexts where the data structure is nested or hierarchical, as is the case in PISA (
Cebolla-Boado 2013). Indeed, students participating in the PISA assessment are nested within their respective schools, which gives rise to a two-level structure: the student level and the school level. Through the use of two-level regression models, it is possible to decompose the variance of the data and to determine what proportion is attributable to differences among students and what proportion arises from differences between schools. Based on this distinction, the intraclass correlation coefficient (ICC) can be computed as
where
and
represent the variance between students and between schools, respectively. Therefore, the ICC is a measure of the proportion of variability that can be attributed to differences between educational institutions.
Within the framework of multilevel techniques, multilevel quantile regression models were employed. Unlike traditional regression models, which focus on estimating the mean of the dependent variable, quantile regression models enable the estimation of the dependent variable at various points along its distribution. As such, these models are particularly useful when the objective is to examine the influence of a set of independent variables at the lower or upper tails of the distribution of a dependent variable, which is precisely the aim of the present study.
The selection of quantiles to be estimated was based on the six proficiency levels in mathematics established by PISA, which are used to classify students according to their mathematical abilities and skills. According to the data presented in
Table 1, 23.54% of Spanish students participating in PISA 2022 are situated at the lowest level of mathematical competence. In distributional terms, level 1 encompasses the range from the minimum observed value of competence to the 23.54th quantile. Consequently, the 11.77th quantile represents the competence level of a typical student positioned at the midpoint of level 1, thereby serving as a reference point to characterise the central performance within this group. Following a similar line of reasoning, it can be observed that students situated at levels 5 and 6—corresponding to the highest levels of mathematical competence—collectively account for 6.63% of the total student population assessed. These levels span the interval between the 93.37th quantile and the maximum observed value of mathematical competence. Therefore, a student whose proficiency corresponds to the 96.68th quantile would be located at the midpoint of this upper range and may be regarded as a representative high-achieving student. In light of this, the 11.77th and 96.68th quantiles were selected for estimation using multilevel quantile regression models. This methodological decision aims to identify the relationship between personal and school-related factors and mathematical proficiency for two distinct student profiles—one situated at the lowest level of competence, and the other at the highest—thus allowing for a more precise examination of the mechanisms through which educational inequalities manifest at both ends of the performance distribution.
The multilevel quantile regression analysis was conducted using the lqmm package in R (
Geraci 2014). Each of the ten plausible values was used separately as the dependent variable to estimate the model parameters, and the resulting estimates were subsequently combined in accordance with the guidelines provided by the
OECD (
2024b). Estimates were considered statistically significant if their absolute values exceeded 1.96 times the corresponding standard error.
3. Results
First, the results of the descriptive analysis of both the dependent variable and the independent variables are presented.
As shown in
Table 3, the average mathematical competence of Spanish students stands at approximately 482 points, with a standard deviation of 84.74 points.
In the student sample, both genders are represented in an almost equal proportion. A total of 12.84% of the students are of foreign origin, and approximately 5.5% of the participants speak a language other than Spanish or any of Spain’s co-official languages. Moreover, it is observed that nearly two out of every ten students have repeated at least one academic year during their schooling, and that the majority of students have completed at least three years of pre-primary education. The mean value of the students’ social, economic, and cultural status index is 0.019, slightly above the OECD average of 0. The median of this index is higher than the mean, indicating a negatively skewed distribution (i.e., with a tail to the left) of the variable.
With regard to schools, just over one third are privately managed institutions, while approximately 70% are located in municipalities with populations equal to or greater than 15,000 inhabitants. The vast majority of schools report being in a competitive environment with neighbouring institutions in terms of student recruitment. A total of 57.84% of schools have an average of fewer than 25 students per classroom, and, on average, each teacher is responsible for 11.54 students. Finally, the mean values of the indices of school-level responsibility for curriculum and resources are 1.34 and 1.19 points, respectively.
Table 4 below presents the parameter estimates and their standard errors resulting from the multilevel quantile regression analyses.
According to the results presented in the previous table, the multilevel quantile regression model provides an estimate of 429.19 points for the 11.77th quantile of Spanish students’ mathematical competence. Among the personal and family background characteristics, the variables that significantly contribute to the estimation of this quantile include the student’s gender, grade repetition, duration of pre-primary education, and socio-economic and cultural status. Specifically, having repeated at least one academic year exerts the strongest negative effect on the quantile estimate, reducing it by more than 80 points in comparison with students who have never repeated a year. Conversely, the socio-economic and cultural status of students has a positive impact on the mathematical competence of low-performing students. In particular, each one-point increase in the index measuring this status results in an estimated increase of 14.06 points in mathematical results. Likewise, attending pre-primary education for three years or more is associated with an improvement of approximately 10.71 points. Finally, student gender also has a statistically significant effect, with boys scoring 9.28 points higher than girls in the estimation of the 11.77th quantile.
Among school-level variables, the most substantial impact on the mathematical competence of low-performing students is observed in school ownership. As shown in
Table 4, students enrolled in private institutions score 17.08 points higher than those attending public schools. The location of the school also significantly influences low-performing students’ proficiency, with those attending schools in rural areas scoring nearly 8.5 points higher than those in urban contexts. Additionally, competition between schools is positively associated with better outcomes, contributing to an increase of 15.63 points in the mathematical proficiency of students in competitive educational environments. On the other hand, classroom overcrowding is detrimental to the performance of low-achieving students, with a decrease of 8.42 points observed in classrooms with 25 or more students compared to those with fewer students. Finally, increased school autonomy in curriculum-related decision-making correlates negatively with mathematical proficiency, with a reduction of 3.25 points for each unit increase in the index measuring curriculum responsibility.
With regard to the 96.68th quantile of mathematical competence, the multilevel quantile regression model yields an estimate of 556.11 points. The personal and family background variables that significantly influence this quantile estimation coincide with those relevant to the 11.77th quantile, although the magnitude of their effects differs in most cases. Once again, repetition of a school year emerges as the most influential factor, with a striking difference of nearly 93 points between repeaters and non-repeaters, to the advantage of the latter. Gender becomes the second most impactful predictor, with boys outperforming girls by 26.89 points. Similar to low-achieving students, a longer duration of pre-primary education positively influences the mathematical proficiency of high-performing students. Specifically, students who attended pre-primary education for three or more years scored over 23 points higher than those with shorter early education trajectories. Likewise, a higher socio-economic and cultural status is associated with better outcomes, with a 15.16-point increase in mathematical proficiency for each one-point rise in the socio-economic, cultural, and educational index.
Among the school-level characteristics analysed, only two variables significantly influence the estimation of the 96.68th quantile: school location and competition between institutions. The coefficient for school location is positive, in contrast to the negative sign observed in the 11.77th quantile estimation. This reversal in sign suggests that the impact of school location on mathematical proficiency varies depending on students’ performance levels. While attending a school in a rural setting was associated with better outcomes for low-performing students, high-achieving students appear to benefit more from being enrolled in schools located in urban areas. In this case, the observed difference amounts to just over 14 points in favour of students attending urban schools. School competition also affects the two performance groups differently. While it was linked to improved performance among low achievers, it appears to exert a detrimental effect on high achievers, whose mathematical proficiency is reduced by approximately nine points when their school operates in a competitive environment.
Finally, based on the variance parameter estimates shown in
Table 4, the intraclass correlation coefficients corresponding to each model were calculated. For the 11.77th quantile model, the ICC is 0.05047, whereas for the 96.68th quantile model, the value is 0.03356. This implies that only 5.047% and 3.356% of the total variance observed in each respective model may be attributed to differences between schools.
4. Discussion
The results obtained in the present study provide evidence of a series of variables that exhibit a statistically significant relationship with the mathematical competence of Spanish students, both among those with low and high levels of performance. However, in certain cases, the strength of this relationship varies depending on the performance group under consideration.
Among the variables related to students’ personal background, grade repetition stands out as particularly significant, displaying a negative association with mathematical proficiency at both ends of the performance spectrum. However, this relationship is especially pronounced among high-achieving students. Spain is one of the OECD countries with the highest rate of grade repetition in lower secondary education, with 7.8% of students repeating a year—substantially above the average reported across OECD countries (2.2%) and European Union member states (2.1%) (
OECD 2024a). This high prevalence is particularly striking considering that, according to the current regulatory framework in Spain, grade repetition is intended to be an exceptional measure (
Organic Law on Education 2006). Nevertheless, and in line with previous research (
Frade-Martínez et al. 2024c;
Gamazo et al. 2018;
Molina-Muñoz et al. 2023), the findings of the present study cast doubt on the effectiveness of this measure—at least in the domain of mathematics—given the direction and magnitude of its association with students’ mathematical competence.
Gender has also shown a statistically significant association with students’ mathematical competence at both the lower and higher ends of the performance spectrum. In both cases, the differences favour boys; however, the magnitude of this disparity is nearly three times greater among high-performing students compared to those with lower levels of achievement. These findings are consistent with those reported by
Frade-Martínez et al. (
2024c),
Gamazo et al. (
2018),
Molina-Muñoz et al. (
2023), and
Ortega-Rodríguez (
2025a), all of whom also conclude that boys tend to outperform girls in mathematics, with average differences of approximately 20 points in most instances. Several factors may contribute to explaining the greater intensity of this gender gap at the higher levels of performance. From a sociocultural perspective, there remains a persistent tendency to associate success in mathematics with the male gender. This societal belief may foster an environment in which boys receive more encouragement, reinforcement, or recognition in mathematical contexts—particularly when they exhibit high achievement—thus enhancing their performance in the discipline. In parallel, it is commonly observed that girls, even those with high levels of mathematical competence, tend to report lower levels of self-efficacy or confidence in their mathematical abilities compared to their male peers. This perception, which frequently does not reflect the students’ actual academic performance, may reduce girls’ participation in mathematically oriented activities, thereby limiting the development of their academic potential and, consequently, exacerbating the gender gap at the upper end of the performance distribution.
Another factor that is also associated with students’ level of mathematical competence is their prior academic trajectory, specifically in relation to the duration of pre-primary education. The findings of the present study reveal that an extended period of pre-primary schooling—defined as three years or more—is positively associated with higher levels of mathematical competence in both groups of students. This association stands in contrast to the results of previous studies, such as those by
Frade-Martínez et al. (
2024c),
Frade-Martínez et al. (
2024a), and
Molina-Muñoz et al. (
2023), in which no statistically significant relationship was identified between pre-primary education and the mathematical achievement of Spanish students. According to the results of the present study, the strength of the association between the duration of pre-primary education and students’ mathematical proficiency differs by performance level, being more than twice as strong among high-achieving students. This variation in the intensity of the association may be partly explained by the sociocultural and familial conditions that tend to characterise high-performing students. These learners often benefit from more advantageous contexts that allow them to make more substantial gains from early childhood education across a range of developmental domains. Conversely, the benefits and effectiveness of early schooling among low-achieving students are frequently constrained by various factors—such as economic hardship, limited cultural capital, or a lack of academic support—that are often present within this student population.
The students’ economic, social, and cultural status is positively associated with their level of mathematical competence. This relationship manifests with a similar magnitude in both low- and high-achieving student groups. A high economic, social, and cultural status functions as an enabling factor that enhances students’ learning opportunities, supporting both the remediation of academic deficits and the development and consolidation of advanced levels of competence. This dual role may account for the similarity in the strength of the association observed between this variable and students’ mathematical performance across both ends of the achievement distribution. Virtually all recent studies—such as those by
Frade-Martínez et al. (
2024c),
Gamazo et al. (
2018),
Molina-Muñoz et al. (
2023), and
Ortega-Rodríguez (
2025a)—have consistently confirmed the positive relationship between the socio-cultural and economic background of the family environment and students’ mathematical competence across various cycles of the PISA assessment. Other research, such as that conducted by
Fajardo-Bullón et al. (
2017), has also documented the link between students’ academic performance and specific components of their sociocultural context, including parental educational attainment and occupational status.
In contrast to these variables, neither immigrant status nor the language spoken at home was found to have a statistically significant relationship with mathematical competence in either student group. Previous research has not reached a consensus on the association of these two factors with the mathematical performance of Spanish students. On one hand, studies such as that by
Frade-Martínez et al. (
2024c) concur in identifying no significant relationship between either of these variables and mathematical competence. On the other hand,
Molina-Muñoz et al. (
2023) found that both immigrant students and those who speak a foreign language at home exhibit lower levels of mathematical competence.
Gamazo et al. (
2018), for their part, identified differences only between the competence of students born outside Spain and their native counterparts, without finding a significant relationship with the language spoken at home. In contrast,
Frade-Martínez et al. (
2024a) identified a statistically significant relationship between the language spoken at home and students’ mathematical competence, whereas no such association was found with immigrant status, based on their analysis of the PISA 2018 data.
With regard to variables related to the school context, the analyses reveal differentiated associations with students’ levels of mathematical competence, depending on their performance. Specifically, private school ownership is positively associated only with the mathematical competence of low-achieving students. In the Spanish educational context, private schools are characterised by a greater degree of pedagogical autonomy, as well as by the existence of formal or informal mechanisms for student selection. Additionally, their funding relies wholly or partially on financial contributions from students’ families, which contributes to shaping a relatively homogeneous and socio-culturally advantaged student profile. This limited socio-cultural diversity, combined with stronger family support and greater resource availability, fosters the academic development of low-performing students in such institutions. Among high-achieving students, the non-significance of school ownership could be explained by the predominance of individual-level factors within this group, such as high intrinsic motivation, a strong interest in learning, or the early consolidation of mathematical skills. These variables may play a neutralising role in mitigating the influence of school ownership among high-performing students, thereby cancelling the differential relationship observed among their lower-achieving peers. Most of the existing literature on this matter, including studies by
Gamazo et al. (
2018) and
Frade-Martínez et al. (
2024a), concludes a non-significant relationship between school ownership and students’ mathematical competence. The study by
Molina-Muñoz et al. (
2023), however, identifies a significant association—in favour of private schools—when only school-level variables are considered as predictors. Nevertheless, the performance gap between students attending public and private schools disappears when the model includes personal and family background variables.
The location of the school and the existence of institutional competition, in turn, exhibit an association with students’ levels of mathematical proficiency that varies in both magnitude and direction across the two groups of students. For low-achieving students, higher mathematical competence is associated with attending rural schools and schools that do not engage in competitive practices. Conversely, for high-achieving students, mathematical proficiency increases when they attend schools situated in urban environments and institutions that compete for student enrolment. This relationship may be explained, firstly, by specific characteristics of rural schools, such as smaller class sizes, which allow for more personalised attention and enable the individualised monitoring of students’ learning processes. Moreover, these types of schools often foster close-knit relationships among teachers, students, and families, contributing to a warm and supportive school climate. Additionally, the absence of institutional competition significantly reduces external pressure to meet specific performance benchmarks. This diminished pressure allows educators to adopt pedagogical approaches that are more responsive to individual differences and specific student needs. Altogether, this favourable context may contribute to improving the mathematical proficiency of students who exhibit lower levels of competence. On the other hand, educational institutions located in urban settings, as well as those characterised by high levels of institutional competition, display a set of common features that can serve as enhancers of mathematical competence among high-achieving students. First, such schools typically benefit from a broader and more diversified array of educational resources, both physical (e.g., specialised mathematical materials, mathematics laboratories) and human (e.g., teaching staff with higher levels of qualification and subject-specific expertise in mathematics). Furthermore, they often provide an extensive, diverse, and frequently demanding range of extracurricular activities, workshops, or enrichment programmes aimed at academic advancement or the development of mathematical talent. Additionally, it is important to consider that urban environments, in and of themselves, offer a variety of intellectual stimuli—such as cultural and scientific activities or museums—that are not commonly available in smaller towns and rural areas. In sum, a competitive and urban context appears to provide high-performing students with a conducive environment for the consolidation and further development of their mathematical competence. Prior research (
Frade-Martínez et al. 2024a,
2024c;
Molina-Muñoz et al. 2023) did not report significant effects for either of these variables on students’ mathematical performance, which stands in contrast to the findings of the present study.
Two additional school characteristics—average class size and autonomy in curriculum-related decisions—appear to be linked only to the mathematical competence of low-achieving students. More specifically, such students benefit from attending institutions with smaller class sizes (i.e., fewer than 25 students per class) and from schools with limited responsibility over curriculum-related decisions. In line with the aforementioned considerations, smaller class sizes allow for more personalised attention to students and the implementation of tailored pedagogical adaptations for those with specific educational support needs. Moreover, active and adaptive teaching methodologies are more feasibly applied in smaller groups, while the presence of disruptive or distracting factors within the classroom is likewise reduced. These characteristics provide more favourable conditions for addressing the needs of low-achieving students. Conversely, their impact on high-performing students may be more limited, given the range of personal, academic, and contextual resources typically available to these learners, which enable them to maintain a high level of mathematical competence even within larger groups. Most of the existing literature, including the studies by
Gamazo et al. (
2018) and
Frade-Martínez et al. (
2024a), concludes that class size does not exert a statistically significant effect on students’ mathematical competence.
Finally, other school-related variables, such as the student–teacher ratio and the school responsibility index with regard to resource management, do not yield statistically significant associations with the level of mathematical competence in either group of students. These findings are consistent with those reported by
Frade-Martínez et al. (
2024a) and
Gamazo et al. (
2018). Nevertheless,
Molina-Muñoz et al. (
2023) identified a statistically significant, albeit modest, association between the student–teacher ratio and students’ mathematical competence.
5. Conclusions
This study highlights that certain personal, social, academic, and school-related factors show differentiated associations with the mathematical competence of Spanish students, depending on their level of performance. These findings may serve as a valuable starting point for the design of personalised educational measures aimed at improving mathematics outcomes for both low- and high-achieving students.
Given the systematic and positive relationship of students’ social, economic, and cultural status with the mathematical competence of both groups, it would be advisable to implement measures aimed at mitigating inequalities arising from factors such as limited resources or a lack of educational support and academic guidance.
Another issue warranting focused attention is the gender gap in mathematics, which consistently favours boys and is particularly pronounced among high-performing students. To reduce this disparity, initiatives could be promoted to foster girls’ interest in mathematics and their pursuit of related careers. For instance, activities that showcase and value the contributions of female mathematicians throughout history may be effective. Additionally, the development of specific programmes to promote and nurture mathematical talent among female students could also prove beneficial.
Moreover, the significance of factors such as grade repetition and the duration of pre-primary schooling underscores the importance of adopting compensatory strategies aimed at alleviating disparities derived from students’ prior academic trajectories. Considering the negative relationship between grade repetition and students’ mathematical competence—especially among high achievers—alternative measures could be envisaged for pupils who do not meet expected learning outcomes in mathematics. These alternatives might include the implementation of mathematics support programmes or the provision of individualised instruction by subject specialists. Similarly, early educational stimulation should be promoted by increasing the number of places available in the first cycle of pre-primary education and by providing early childhood education centres with the necessary human and material resources to ensure the quality of education during this stage.
At the institutional level, school leaders should reflect on the relationship between certain variables—such as competition between schools, class size, or the degree of curricular autonomy—and students’ mathematical proficiency, particularly in the case of low-achieving pupils. Such reflection should give rise to action proposals aimed at achieving a balance between the school’s pedagogical approach and academic equity for all students. Likewise, it would be advisable to leverage inherent characteristics of the school—such as its location—for the benefit of students’ mathematics outcomes. This could be accomplished by considering the local context as an educational resource, taking it into account when designing classroom activities or selecting teaching methodologies.
Several limitations were encountered in the course of this study and should be considered when interpreting the findings. One such limitation concerns the selection of predictors included in the multilevel quantile regression models, as only a subset of the contextual variables provided by PISA was utilised. While the selection was guided by theoretical relevance and prior empirical evidence, the exclusion of other potentially informative predictors may limit the comprehensiveness of the analysis. In this regard, the findings of the present study could be complemented by further analyses incorporating predictors not considered here. Special attention should be paid to student-level characteristics when selecting additional predictors, given the low intraclass correlation coefficients obtained. These values suggest that most of the unexplained variability in students’ mathematical proficiency is attributable to differences between individual students rather than between schools. Furthermore, it would be worth considering a third level of data nesting, consisting of the autonomous communities in which the schools are located. This would enable an examination of whether regional variables—such as GDP per capita or regional education expenditure—exert a similar influence on the mathematical competence of students at the extreme ends of the performance distribution. Finally, the limited body of literature addressing the determinants of mathematical proficiency among Spanish students with low and high achievement levels has constrained the depth of the discussion. This gap underscores the need for continued research in this area of study.