project 1

2024 Presidential Election Prediction

This project aims at predicting how many electoral votes will Joe Biden win in the 2024 presidential election if he and Donald Trump are the candidates for Democrat and Republican respectively for the second time.

This project achieved the following:

  • Used web scraping to get poll data from FiveThirtyEight and get the table of electoral votes for each state as well as the table of the affiliation of each state from two other websites.
  • Used data wrangling to remove unnecessary information in the poll data.
  • Used Bayesian statistical analysis with three different priors together with the bias term to estimate the posterior of election of each state.
  • Performed the Monte Carlo simulation to get the final estimation of the electoral votes.

The project website is available here.

The GitHub repository of this project can be found at here, which includes both the code and the project report.