Article
What r = -0.50 Means in an R Analysis of State Life Expectancy and the 2024 Vote
Across the 50 U.S. states and Washington, D.C., the correlation between 2022 life expectancy and the two-candidate margin in the 2024 presidential vote was r = -0.50 with p = .00019. This article shows how to check that result in R and separate a state-level association from individual or causal claims.
Share
Koharu's reading tip
A practical guide to reading a small p-value alongside data years, the unit of analysis, the scatter plot, and test assumptions.

A scatter plot of state life expectancy against presidential vote margin slopes downward. When the accompanying numbers are r = -0.50 and p = .00019, the result can look more conclusive than it really is.
What has actually been established? A state-level description—states with a larger Republican two-candidate margin tended to have lower life expectancy—is several steps away from explaining an individual's vote or lifespan.
By tracing how the 51 geographic observations were joined and tested in R, we can define what the correlation and p-value support, what they do not support, and what a stronger follow-up analysis would need.
Joining 51 states and D.C. produces a state-level linear association
The election data come from the FEC's official 2024 presidential results, compiled from certified state election-office results. The analysis covers the 50 states and Washington, D.C., and constructs this value from Trump and Harris votes:
Two-candidate margin = (Trump votes - Harris votes) / (Trump votes + Harris votes)
A positive value favors Trump and a negative value favors Harris within their combined vote total. Because third-candidate votes are excluded from the denominator, this is a two-candidate-normalized margin, not a margin over all ballots cast.
The other column is life expectancy at birth from the CDC's 2022 state life tables. It is a period-life-table measure: the expected remaining years for a hypothetical cohort if the age-specific mortality rates of 2022 persisted, not the observed lifespan of a cohort followed from birth. The CDC's life-table guide describes it as a snapshot of mortality conditions in that period.
Joining the two columns by state code yields 51 pairs and a Pearson correlation of r = -0.50. The negative sign means that states with a margin farther toward the Republican candidate tended to have lower life expectancy. An absolute value of 0.50 is well short of a perfect line but still represents a visible linear association in this dataset.
A small p = .00019 does not establish causality or an individual effect
For the 51 pairs, the reported test statistic is t = -4.041 with 49 degrees of freedom and p = .00019. In R, cor.test() tests a zero-correlation null for the Pearson method; under its assumptions, the statistic follows a t distribution with n - 2 degrees of freedom.
The p-value helps assess how incompatible the observations are with the specified zero-correlation model. As the American Statistical Association's statement explains, it is not the probability that the hypothesis is true, the probability that chance alone produced the result, or a measure of practical importance.
Nor does the p-value add a direction of causation. The NIST scatter-plot guide explicitly notes that association does not prove cause and effect. Income, health-care access, occupation, age structure, and regional context could relate to both variables; this two-variable correlation cannot separate those paths.
The dots are states, not people. Following the CDC's warning about aggregate-data interpretation, projecting a geographic association onto individuals risks an ecological fallacy. The data do not show that an individual Trump voter has a shorter lifespan, nor that a voting choice changes longevity.
In R, inspect the coefficient, plot, and sensitivity together
Once the election counts and life-expectancy values have been joined into df by state, the core calculation is short. Checking the row count and missing values first helps prevent a bad join from masquerading as a statistical result.
dfTRUMP - dfTRUMP + df$HARRIS)
stopifnot(nrow(df) == 51)
stopifnot(!anyNA(df[c("vote_margin", "Tot_LE")]))
pearson_result <- cor.test(
df$vote_margin,
df$Tot_LE,
method = "pearson",
conf.level = 0.95
)
pearson_result
The result exposes r in estimate, the p-value in p.value, and a confidence interval for the correlation in conf.int. Using the same rounded life-table values as the source gives r of approximately -0.50.
Do not stop at the printed numbers. A scatter plot should be used to inspect linearity, unusual points, and changing spread. NIST likewise treats the scatter plot as a diagnostic for linear or nonlinear structure, outliers, and heteroscedasticity.
If the Pearson assumptions or outlier sensitivity are a concern, compare a rank-based Spearman test. Its result should be calculated rather than assumed.
spearman_result <- cor.test(
df$vote_margin,
df$Tot_LE,
method = "spearman",
exact = FALSE
)
spearman_result
A large difference in sign or magnitude between the Pearson and Spearman results is a cue to return to the plot and examine influential observations, nonlinearity, and the distinction between ranks and raw values. Independence between geographic units is not automatic either, so the simple p-value should remain conditional on the model assumptions.
Fix the analysis context at 2022 health data and the 2024 vote
This comparison joins life expectancy derived from 2022 mortality conditions with the presidential election held on November 5, 2024. As of August 23, 2026, the CDC publication list identifies 2022 as its latest state life-table release, while a 2023 national life table is also available. A newer national figure should not silently replace an older state-level dataset with different geographic detail.
For reproducibility, record the official FEC Excel file, the CDC report version, the 51 included areas, and the exact two-candidate-margin formula together. The published CDC table contains rounded display values, so changing the dataset or reference year can change the coefficient.
Moving from description to causation requires more than aligning years and geography. A stronger design would predefine likely confounders, account for geographic dependence, test whether the pattern persists across years, and use individual-level data when making individual-level claims. The simple correlation is best treated as an exploratory result that helps decide which of those questions is worth pursuing.
The negative state-level correlation is a hypothesis generator, not a causal verdict
The opening question has a two-part answer. Across the 51 areas, 2022 state life expectancy and the 2024 two-candidate vote margin had a negative linear association of r = -0.50, producing data that are difficult to reconcile with a zero-correlation model under the test assumptions.
The analysis does not show that party support determines lifespan or that an individual's vote is related to their longevity. In practice, preserve the years and unit of analysis in every title or caption, and report the plot, confidence interval, and sensitivity checks alongside the p-value. That is how this result can inform the next question without claiming more than the data establish.
Source
- Title: Does state life expectancy correlate with political party voting?
- URL: https://www.r-bloggers.com/2026/08/does-state-life-expectancy-correlate-with-political-party-voting/
Share
Related Articles
These articles share nearby categories or tags, so you can keep reading along the same thread.




