December 10, 2025
Religious and security candidacies in Brazilian elections for deputies (2014-2022): investigating the probability of being elected
Author: Denis Berté Sálvia — Advisor: Larissa Giardini Simões
Summary prepared by the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege focused on synthesis and writing.
This study verified whether candidates for state and federal deputy with ballot names or occupations in the religious and security fields, between 2014 and 2022, were more likely to be elected. The analysis measured the effect of these identities in relation to sociodemographic and contextual variables, comparing the performance of a machine learning technique (Random Forest) with a traditional statistic (Binary Logistic Regression) to determine which was most suitable for the problem. The impact of these identities was compared to a set of predictors such as gender, education level, age, marital status, race, political position, and macro-region.
In Brazil, ballot names function as electoral heuristics, serving as cognitive shortcuts to influence the electorate (Boas, 2014). Markers such as “Doctor” or “Professor” associate the candidate with perceived positive competencies, simplifying the choice in an environment of limited information (Amorim, 2023; Graça et al., 2025). In this context, candidacies linked to the religious sphere and the public security sector have gained prominence, reflecting the centrality of moral and order agendas in the electoral debate.
The growth of religious candidacies is documented, with a 225% increase between 2000 and 2024, with names linked to evangelical denominations being the most prominent (Agência Brasil, 2024). Studies analyze the phenomenon through digital communication (Barba and Massuchin, 2024), municipal campaigns (Mezzomo and Pátaro, 2017), and classifications based on ballot name and occupation to understand the influence of religion in politics (Reis et al., 2022, 2024).
In parallel, attention to candidacies from the security area intensified, with a 36% growth in the number of elected officials who used military patents in their ballot name between 2000 and 2024 (Nexus, 2024b). Studies have traced the profile of these candidates (Plácido and Gallo, 2021; Piazza and Landy, 2024) and regression models found positive effects on the number of votes for them in 2018 (Graça et al., 2025), reinforcing the relevance of the topic.
The joint investigation of religious and security groups is justified by both emerging from a political context of valuing conservative discourses and order. Although the relationship between religion and politics is more studied, the rise of security candidacies is a more recent phenomenon. This study performs a simultaneous and comparative analysis of the impact of both on the probability of election over three cycles (2014, 2018, and 2022), controlling for relevant variables pointed out in the literature (Miguel, 2003; Junckes et al., 2015).
The research is quantitative, explanatory, and retrospective, comparing the performance of binary logistic regression (RLB) with random forest (RF). Open data from the Superior Electoral Court (TSE) from the 2014, 2018, and 2022 elections were used. The 2014 and 2018 data were used for training and validation of the models, and the 2022 data as a test base to evaluate predictive capacity. The analyses were conducted separately for state and federal deputy positions.
The classification of candidates as “religious” or “security” followed criteria from previous studies (Reis et al., 2022; Instituto Sou da Paz, 2024; Graça et al., 2025), based on the “BALLOTNAME” and “OCCUPATION” variables from the TSE. For the “security” category, terms such as “cabo”, “capitão”, “coronel”, “delegado”, “policial”, and “sargento” were used, along with occupations like “policial militar” and “membro das forças armadas”. For “religious”, the terms included “pastor”, “padre”, “bispo”, “missionário”, and the occupation “sacerdote ou membro de ordem ou seita religiosa”. In case of overlap, the ballot name took precedence.
The categorical explanatory variables (sex, race/color, age group, education level, marital status, political party spectrum, and macro-region) were transformed into dummy variables. The dependent variable, the electoral outcome, was coded binarily (0 for “not elected” and 1 for “elected”). The extreme data imbalance, with approximately 6.5% elected, was a methodological challenge mitigated with balancing techniques. In Random Forest, a Grid Search with cross-validation was performed to optimize hyperparameters based on the F-score, also applying the parameter class_weight=’balanced’ (Fávero & Belfiore, 2022; Chen et al., 2004). In Binary Logistic Regression, a sample weighting technique was applied. The final evaluation of the models on the test set was performed based on the metrics of Accuracy, Recall, Precision, F1-score, and the area under the ROC curve (AUC-ROC).
In the base of state deputies (47,646 candidates), 2.64% were classified as “religious” and 5.48% as “security”. The Random Forest model assigned low relative importance to these variables: “religious” was the least important of all (1.5%), while “security” reached 3%. The most predictive variables were sociodemographic characteristics such as education level (higher and secondary education), gender (male), color/race (white), and marital status (married), in addition to the Northeast region. This suggests that identity markers contribute very little to explaining electoral success compared to structural factors.
The Binary Logistic Regression for state representatives corroborated these findings. The variable “security” did not show statistical significance (p > 0.05) and was removed from the model. The variable “religious” was statistically significant, but with a negative coefficient, indicating that being a candidate with this identity was associated with a reduction in election chances (Odds Ratio = 0.83), corresponding to a 45.3% probability of success. The variables with the strongest positive effects were again the sociodemographic ones, such as having higher education, being male, being white, and being married.
On the 2022 test base for state representatives, the models’ performance was modest and similar. Random Forest achieved an accuracy of 0.70 and an F1-score of 0.22, while Logistic Regression obtained 0.66 accuracy and 0.20 F1-score. Both presented reasonable recall (0.66 and 0.70, respectively), but extremely low precision (0.13 and 0.12), meaning that the vast majority of candidates predicted as “elected” were not. This high number of false positives, reflected in the low AUC-ROC scores and metrics (0.747 and 0.741), confirmed that there was no clear superiority of one approach over the other.
For the federal deputies base (24,160 candidates), 2.4% were classified as “religious” and 5.8% as “security”. The Random Forest model for this base was consistent with those of the state base, assigning low relative importance to the variables of interest. The most important characteristics for predicting election were, again, higher education, male gender, white color/race, and married marital status, along with the North and Northeast regions. This reinforces that a specific sociodemographic profile is a more powerful predictor than the niche identities investigated.
In the Binary Logistic Regression model for federal deputies, both variables of interest, “religious” and “security”, were statistically significant but presented negative coefficients. Being a candidate with a religious identity was associated with a 43.2% probability of election (OR=0.76), while for security identity, the probability was 41.3% (OR=0.70). This counterintuitive finding suggests that, when controlling for other variables, these identities may represent a disadvantage. The variables with the largest positive effects were again higher education, belonging to a left or right-wing party (compared to the center), being male, and being white.
The performance comparison of the models on the test set for federal deputies mirrored the results of the state analysis. The metrics were close, with Random Forest achieving an accuracy of 0.70 and an F1-score of 0.19, and Logistic Regression reaching 0.64 accuracy and 0.17 F1-score. Again, the models exhibited moderate recall (0.66 and 0.71) but very low precision (0.11 and 0.10), indicating a high rate of false positives. The AUC-ROC curves (0.747 and 0.741) confirmed the absence of a clear winner. The overall performance suggests that predicting electoral success requires the inclusion of other variables not available in the TSE data, such as campaign finance, television time, and incumbency status.
The results indicate that religious and security identities, when controlled for more robust demographic and political factors, did not prove to be an asset in increasing the probability of election as a deputy between 2014 and 2022. On the contrary, the regression models pointed to a negative association. This finding, seemingly paradoxical given the growing visibility of these groups, can be explained by the internal heterogeneity of the candidates. The electoral success of individuals from these groups may be more attributable to classic political science factors, such as political and financial capital, than to the identity label itself. The overwhelming predictive power of variables such as education, gender, and race may overshadow the impact of more specific attributes.
In summary, this study analyzed the probability of election for candidates with religious and security profiles. The analyses, using both Random Forest and Binary Logistic Regression, demonstrated that, although statistically significant in some models, these identities are associated with a reduction, not an increase, in the probability of election for state and federal deputies in the 2014, 2018, and 2022 elections, when controlled for more influential sociodemographic and contextual variables. The comparison between the analytical models did not reveal a clear advantage of one technique over the other, with both presenting modest performance and difficulties in correctly classifying elected candidates due to a high rate of false positives.
The study’s limitations include the imbalance of the dependent variable and the absence of crucial variables such as campaign spending and reelection status. For future research, it is suggested to incorporate these variables, as well as explore models that capture interaction effects between the identities of interest and other characteristics. Longitudinal analyses focused on each election separately could reveal specific temporal dynamics, and applying these analyses to municipal elections could offer an interesting counterpoint. It is concluded that the objective was achieved: it was demonstrated that religious and security identities, contrary to expectations, are associated with a reduction in the probability of election as federal and state deputy in the analyzed period, when controlled for other sociodemographic and political variables.
References:
BRAZIL AGENCY. 2024. Candidacies with religious identity grow 225% in 24 years. Available at: https://agenciabrasil. ebc. com. br/politica/noticia/2024-08/candidaturas-com-identidade-religiosa-crescem-225-em-24-anos. Accessed on: 05 Jun. 2025.
AMORIM, L. de C. de. 2025. Magnitude of discernment and the effect of polarizing heuristics. SciELO Preprints, 2023. DOI: 10.1590/SciELOPreprints.7006. Available at: https://preprints. scielo. org/index. php/scielo/preprint/view/7006. Accessed on: 6 Mar. 2025.
BARBA, M; MASSUCHIN, M. 2024. Religious crossings in Brazilian electoral campaigns: discourses, appeals, and gestures in the online communication of pastor and non-pastor candidates in 2020. Opinião Pública 30: 1 – 31.
BOAS, T. 2012. Vote for Pastor Paulo: Religious Ballot Names as Heuristics in Brazil. In: APSA 2012 Annual Meeting Paper.
BOAS, T. 2014. Pastor Paulo vs. Doctor Carlos: Professional titles as voting heuristics in Brazil. Journal of Politics in Latin America 6(2): 39-72.
BOLOGNESI, B.; RIBEIRO, E.; CODATO, A. 2023. A New Ideological Classification of Brazilian Political Parties. Rio de Janeiro: Dados 66 (2), e20210164. Available at: <https://doi. org/10.1590/dados.2023.66.2.303>. Accessed on: 15 Nov. 2023.
CHEN, C; LIAW, A; BREIMAN, L. 2004. Using random forest to learn imbalanced data. University of California, Berkeley, Technical Report, 1-12.
FÁVERO, L. P.; BELFIORE, P. 2022. Manual of data analysis: statistics and multivariate modeling with Excel®, SPSS® and Stata®. Rio de Janeiro: LTC.
GENUER, R.; POGGI, J. M.; TULEAU-MALOT, C. 2010. Variable selection using random forests. Pattern recognition letters, 31(14): 2225-2236. Available at: https://hal. science/hal-00755489/document. Accessed on: 25 Mar. 2025.
GRAÇA, L. F. G. D.; SOUZA, C. P. R. D.; BORGES, T. D. P. 2025. About bullets, bibles, and statistical models: exploring electoral shortcuts. Campinas: Opinião Pública (31), e31107.
Instituto Sou da Paz. 2024. Elections 2024: Panorama of security forces candidacies. Available at: https://soudapaz. org/wp-content/uploads/2024/12/Eleicoes-2024-Panorama-Das-Candidaturas-Das-Forcas-De-Seguranca-Atualizado. pdf. Accessed on 10 Mar. 2025.
JUNCKES, I. J.; HOROCHOVSKI, R. R.; CAMARGO, N. F.; SILVA, J. M.; SILVA, E. A.; ALMEIDA, L. B. 2015. Positioning of women in the electoral financing network and their performance in the 2010 elections in Brazil: the structural dynamics of female exclusion and marginalization in political power. Revista Latino-Americana de Geografia e Gênero 6(1): 25-47.
MEZZOMO, F. A; PÁTARO, C. S. O. 2017. Religion and politics: institutional strategies and religious appeals by evangelical candidates in proportional elections (2008-2016). Revista de Estudos da Religião (REVER) 17(3): 139-165.
MIGUEL, L. F. 2003. Political capital and electoral career: some variables in the election for the Brazilian Congress. Revista de Sociologia e Política 20:115-134.
MUCHLINSKI, D.; SIROKY, D.; HE, J.; KOCHER, M.; 2016. Comparing random forest with logistic regression for predicting class-imbalanced civil war onset data. Political Analysis 24(1): 87-103.
NEXUS – Pesquisa e Inteligência de Dados a. 2024. 469 candidates with religious names are elected in the 1st round. Available at: nexus. fsb. com. br. Accessed on: 5 Mar. 2025.
NEXUS – Pesquisa e Inteligência de Dados b. 2024. 1st round has a record of elected military personnel, with 152 candidates. Available at: https://www. nexus. fsb. com. br/estudos-divulgados/1-turno-tem-recorde-de-militares-eleitos-com-152-candidatos/. Accessed on: 5 Mar. 2025.
NOVAES, L. M. 2024. The violence of Law-and-Order politics: the case of law enforcement candidates in Brazil. American Political Science Review 118(1): 1-20.
PIAZZA, K; LANDY, J. 2024. Captain Mayor and Sergeant Councilman? An Assessment of the Reach of Military Politicization in Brazilian Politics. Armed Forces & Society 00(0): 1-36.
PLÁCIDO, C. P. M; GALLO, C. A. 2021. The return of those who never left: Who are they and what did they convey in their candidacies, the “parlamilitary” elected in 2018?. Brasiliana: Journal for Brazilian Studies 10(2): 330-350.
Python Software Foundation. 2024. The Python Standard Library: re – Regular expression operations. In: https://docs. python. org/3/library/re. html. Accessed on 07 Mar. 2025.
REIS, L; ABREU, G; CUNHA, M; PESTANA, M. C. 2022. Religion and Vote: a photograph of the candidacies with religious identity in the 2020 Elections. Rio de Janeiro: Instituto de Estudos da Religião (ISER). Available at: iser. org. br. Accessed on: 07 Mar. 2025.
REIS, L; OWSIANY, L; CUNHA, M; PESTANA, M (Eds.). 2024. What did we learn from researching religion and elections?. Rio de Janeiro: Instituto de Estudos da Religião (ISER). Available at: iser. org. br. Accessed on: 07 Mar. 2025.
ROCHA, D. N. N. 2019. Evaluation of predictive models for the extraction of significant characteristics in Brazilian elections. Bachelor’s Monograph in Computer Science. Universidade Federal de Campina Grande, Campina Grande, Paraíba, Brazil.
Executive summary from the Final Project of the Specialization in Data Science and Analytics from the MBA USP/Esalq
Learn more about the course; click here: