Forecasting the 2025 Canadian Federal Election

Statistical Modeling

A logistic regression with post-stratification model forecasting the 2025 federal election

Forecasting the 2025 Canadian Federal Election

Overview

This applied statistics project forecasts the popular vote of the 2025 Canadian federal election between the Liberal and Conservative parties. It pairs a logistic regression model, fit on survey responses, with post-stratification over census demographics, so that estimates from a sample can be extrapolated to the full voting population.

Research Question

Which of the two major parties, Liberal or Conservative, will win the election based on voter demographics in Canada? The working hypothesis, given the Liberal win in 2021, was that the Liberals would again receive the higher vote share.

Data

Two datasets were combined:

  • Modelling: the 2019 Canadian Election Study Phone Survey (4,021 respondents), which records Canadians’ attitudes and characteristics around the 2019 federal election.
  • Post-stratification: the 2017 General Social Survey on Social Identity (Statistics Canada census data across ten provinces), which describes the demographics of the population.

A substantial cleaning step aligned variables and category levels between the two sources (age, sex, birthplace, province, education, household income, and household size), filtered undecided and refused responses, and restricted to eligible voters aged 18 and over. Binary outcome variables were created for voting Liberal and voting Conservative.

Methodology

A logistic regression model was fit for each party, with predictors chosen by stepwise selection on AIC. The outcome is binary (vote for the party or not), so the model estimates the log-odds of voting for a party as a function of demographics:

log ⁣(p1p)=β0+β1age+β2sex+β3birthplace+β4province+β5education+β6income\log\!\left(\frac{p}{1-p}\right) = \beta_0 + \beta_1\,\text{age} + \beta_2\,\text{sex} + \beta_3\,\text{birthplace} + \beta_4\,\text{province} + \beta_5\,\text{education} + \beta_6\,\text{income}

The fitted models were then applied through post-stratification, which estimates the vote probability within each demographic cell and reweights by each cell’s share of the population:

y^PS=jNjy^jjNj\hat{y}^{PS} = \frac{\sum_j N_j\,\hat{y}_j}{\sum_j N_j}

where NjN_j is the size of cell jj and y^j\hat{y}_j is the model estimate for that cell. Model assumptions were checked: a binary outcome, linearity in the logit for age via Box-Tidwell (p = 0.175, assumption satisfied), variance inflation factors near 1 (no multicollinearity), and no strongly influential outliers.

Results

Applying the models across all population cells produced these win probabilities:

PartyProbability of winning
Liberal34.7%
Conservative35.6%

The model favored the Conservative Party by a narrow margin, reversing the project’s initial hypothesis. The two estimates are close, so the result is best read as a lean rather than a confident call.

Limitations

Several caveats temper the forecast: there was no control over how the survey data were collected, non-voters and undecided respondents were not modelled, only the two leading parties were considered, and stepwise selection can bias coefficient estimates and inflate test statistics. Hidden subgroups in the data may also go unaccounted for.

Key Technologies

  • Logistic regression with stepwise AIC selection: demographic vote models
  • Post-stratification: extrapolating cell estimates to the full population
  • R (ggplot2, broom, flextable): data cleaning, modelling, and visualization

References

  1. L. B. Stephenson, A. Harell, D. Rubenson, and P. J. Loewen. “Canadian Election Study, 2019, Phone Survey.” 2020.
  2. Statistics Canada. “General Social Survey on Social Identity.” 2017.