2026-10-25

Research Question

Voter registration numbers can vary significantly across Arizona counties.

But how closely are registration numbers in one general election related to those in the next?

Using voter registration totals from the November 2022 and November 2026 general elections listed on the Arizona Secretary of State’s website, I will explore the relationship between registration totals across Arizona’s 15 counties.

I am particularly interested in this question because as a registered voter in Arizona, I am curious if there have been any notable changes in voter registration since the last general election (4 years ago).

The Mathematics of Linear Regression

Simple linear regression is a statistical method used to model the relationship between two continuous quantitative variables. It allows us to summarize data by having one variable, the independent variable, predict the other, the response variable.

We will use this to describe the relationship between voter registration in the two most recent Arizona general elections. The independent variable will be the voter registration totals for each county in 2022, and we will use this to predict the response variable, which are these values in 2026.

The regression model is:

\[ Y = \beta_0 + \beta_1 X + \epsilon \]

  • \(Y\): Current election voter registration
  • \(X\): Previous election voter registration
  • \(\beta_0\): Intercept
  • \(\beta_1\): Slope
  • \(\epsilon\): Random error

The goal is to find the line that best describes the relationship between the two variables. This line will minimize the sum of squared differences between the actual points and the predicted line.

Fitting the Regression Model in R

# import and clean data
library(readxl)

Arizona_Voter_Registration = read_excel(
  "Arizona_Voter_Registration.xls",
  col_names = FALSE,
  skip = 2
)
## New names:
## • `` -> `...1`
## • `` -> `...2`
## • `` -> `...3`
df = Arizona_Voter_Registration
head(Arizona_Voter_Registration)

colnames(df) = c("county", "last_general_election",
                 "current_general_election")

# Fit the regression model
my.model = lm(current_general_election ~ last_general_election,
              data = df)

summary(my.model)

Interpreting the Regression Equation

After analyzing the data using R, our estimated regression equation is:

\[ \widehat{Y} = -1877 + 1.063X \]

The slope is:

\[ \widehat{\beta}_1 = 1.063 \]

Interpretation: For every additional 1,000 registered voters in the previous election, the model predicts approximately 1,063 additional registered voters in the current election, on average.

The coefficient of determination is:

\[ R^2 = 0.9999 \]

This means that the linear model accounts for approximately 99.99% of the observed variation in current registration totals across these 15 counties. The high coefficient of determination indicates that voter registration is consistent between elections, but the model does not tell us why this is the case.

Voter Registration Across Elections

I was also wondering if a county with more registered voters in the previous general election also tended to have more in the current election. The scatterplot below shows this relationship.

## `geom_smooth()` using formula = 'y ~ x'

There is a strong linear relationship between previous election registration and current election registration, as in this election, counties tended to have very similar totals to the previous election.

Validating with Percentage Change

However, county registration totals vary greatly, so percentage change helps to compare counties relative to their initial totals.

\[ \text{Percentage Change} = \frac{\text{Current} - \text{Previous}} {\text{Previous}} \times 100 \]

For each county, I subtract the previous registration total from the current total, divide by the previous total, and multiply by 100 to get the percent change.

Which counties changed the most?

The percent change values allow us to investigate which counties had the most significant changes in voter registration.

Counties with bars farther to the right had larger percentage increases. Bars extending to the left of zero indicate decreases. Santa Cruz (12.9% increase) and Pinal county (11% increase) had the largest percentage change in voter registration. Coconino (3% decrease) had the largest decrease in registered voters. These results show that although registration totals were strongly associated across elections, the relative changes differed by county.

Exploring Registration in 3D

  • The x-axis shows registration in the previous election.
  • The y-axis shows registration in the current election.
  • The z-axis shows the percentage change between elections.
  • Each point represents an Arizona county.

The interactive 3D graph allows us to rotate the view and hover over counties to explore their registration patterns. The graph shows that although counties with larger previous registration totals generally have larger current totals, their percentage changes differ. This shows why comparing percentage change can reveal patterns that raw registration totals alone do not.

3D Voter Registration by County

The code below shows the R code for this visualization:

library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':

    last_plot
The following object is masked from 'package:stats':

    filter
The following object is masked from 'package:graphics':

    layout
plot_ly(
  data = df,
  x = ~last_general_election,
  y = ~current_general_election,
  z = ~percent_change,
  type = "scatter3d",
  mode = "markers",
  color = ~percent_change,
  text = ~county,
  hovertemplate = paste(
    "<b>%{text}</b><br>",
    "Previous registration: %{x:,}<br>",
    "Current registration: %{y:,}<br>",
    "Percentage change: %{z:.2f}%",
    "<extra></extra>"
  ),
  marker = list(size = 5)
) %>%
  layout(
    scene = list(
      xaxis = list(title = "Previous Registration"),
      yaxis = list(title = "Current Registration"),
      zaxis = list(title = "Percentage Change (%)"),
      camera = list(
        eye = list(x = 1.5, y = 1.5, z = 1.2)
      )
    ),
    title = "Arizona Voter Registration Changes"
  )

What Did We Learn?

  • Arizona counties with higher voter registration in November 2022 generally also had higher registration in November 2026.
  • The linear regression showed a very strong positive relationship between registration totals across the 15 counties, with an \(R^2\) of 0.9999.
  • Percentage changes varied by county. Santa Cruz and Pinal had the largest increases, while Coconino and Greenlee experienced decreases.
  • Comparing percentage changes helps reveal differences that are harder to see from raw registration totals alone.
  • This analysis describes the relationship between pre-election registration totals but does not explain why registration changed in each county.

Sources

Data source: Arizona Secretary of State, Voter Registration Counts, November 2022 and November 2026 general elections. These are pre-election registration totals, not voter turnout.