Assessing the Role of Positive and Negative Tweets in Predicting Electoral Outcomes: A Study of the 2019 Lok Sabha and 2020 U.S. Elections

International Journal of Computer Science and Engineering |
© 2025 by SSRG - IJCSE Journal |
Volume 12 Issue 7 |
Year of Publication : 2025 |
Authors : Nirvaan Malhotra |
How to Cite?
Nirvaan Malhotra, "Assessing the Role of Positive and Negative Tweets in Predicting Electoral Outcomes: A Study of the 2019 Lok Sabha and 2020 U.S. Elections," SSRG International Journal of Computer Science and Engineering , vol. 12, no. 7, pp. 1-5, 2025. Crossref, https://doi.org/10.14445/23488387/IJCSE-V12I7P101
Abstract:
This research paper aims to ascertain whether positive or negative tweets are a more effective indicator for predicting electoral outcomes. The investigation primarily focuses on two major elections: the 2019 Indian Lok Sabha election and the 2020 U.S. presidential election. The study compares sentiment trends of Twitter users against real-world election results. Tweets about the main political parties in each election were collected from Kaggle, a public data source. Each tweet was analyzed using the RoBERTa sentiment analysis model, which assigned positive, negative, and neutral sentiment scores. The strongest positive or negative score was recorded as the final sentiment for each tweet. After classifying the tweets, the ratio of positive tweets between the two parties was calculated and compared to the ratio of votes won in the actual election. Similarly, the ratio of negative tweets between the two parties was calculated and compared to the ratio of votes lost. The findings show that while both forms of sentiment are relevant, positive tweets align more closely with electoral success. In contrast, negative tweets do not reliably predict losses. This suggests that supportive sentiment expressed online may be a stronger indicator of real-world outcomes than negative sentiment alone.
Keywords:
Electoral prediction, Machine learning, RoBERTa, Sentiment analysis, Social media analytics.
References:
[1] Adam Bermingham, and Alan F. Smeaton, “On Using Twitter to Monitor Political Sentiment and Predict Election Results,” Workshop at the International Joint Conference for Natural Language Processing, Chiang Mai, Thailand, pp. 1-9, 2011.
[Google Scholar] [Publisher Link]
[2] Murphy Choy et al., “A Sentiment Analysis of Singapore Presidential Election 2011 using Twitter Data with Census Correction,” arXiv preprint arXiv:1108.5520, pp. 1-11, 2012.
[CrossRef] [Google Scholar] [Publisher Link]
[3] Suryansh Bhatnagar, Effectiveness of Sentiment Analysis for Predicting Election Outcomes, ResearchGate, pp. 1-8, 2023. [Online]. Available: https://www.researchgate.net/publication/376230037_Effectiveness_of_Sentiment_Analysis_for_predicting_Election_Outcomes
[4] Manuel Garcia-Herranz et al., “Using Friends as Sensors to Detect Global-Scale Contagious Outbreaks,” PLoSONE, vol. 9, no. 4, pp. 1 7, 2014.
[CrossRef] [Google Scholar] [Publisher Link]
[5] Kokil Jaidka et al., “Predicting Elections from Social Media: A Three-Country, Three-Method Comparative Study,” Asian Journal of Communication, vol. 29, no. 3, pp. 252-273, 2017.
[CrossRef] [Google Scholar] [Publisher Link]
[6] Yu Wang, Yuncheng Li, and Jiebo Luo, “Deciphering the 2016 U.S. Presidential Campaign in the Twitter Sphere: A Comparison of the Trumpists and Clintonists,” Journal of Big Data, vol. 5, no. 34, pp. 723-726, 2018.
[CrossRef] [Google Scholar] [Publisher Link]