One of the Sustainable Development objectives proposed by UNESCO in its 2030 agenda is to achieve gender equity in the entire educational system, emphasizing the teaching of science, technology, engineering and mathematics (STEM) for girls and the women. Worldwide, 30% of STEM students are women and the remaining 70% are men. Studies on academic performance at the secondary level such as the PISA tests establish a gap between performance in mathematics between women and men, these being The latter are those with better academic performance. This factor may explain the low rate of women in STEM careers at the university level. This paper analyzes the impact of the study modality, the sex of the student and the teacher, on the final grade, considered as an indicator of the academic performance of university students in the subject of probability and statistics at the Polytechnic School. National, from 2019 to 2023. In this case, for the final grade, a weighted value is considered, including exams, homework, class participation and projects. When comparing the final grade with the study modality using the Wilcoxon hypothesis test, the null hypothesis is rejected, with a pvalue less than 0.01, that is, the grades are not the same in all study modalities. To confirm these results, we used a Kruskal-Wallis hypothesis test similar to the Wilcoxon hypothesis test, obtaining the same result. To analyze the final grade with the sex of the student, a Mann-Whitney hypothesis test was carried out by which it is verified. that the final grade is not significantly different if it is compared between groups of students by sex. To analyze the impact of the study modality and the sex of the teacher, after rejecting the hypothesis of group equality using the Kruskal-Wallis test, a logistic regression model was built taking these as covariates and approval or approval as the response variable. not of the course. It was determined that the probability of passing the course depends significantly on the study modality and the sex of the assigned teacher.