2026-10-25

The question

  • Phoenix is one of the hottest cities in the united states
  • Is phoenix actually getting hotter over time?
  • I will use a simple linear regression on the data to find out

The Data

  • My source is the National Centers for Environmental Information
  • Average yearly temperature in Phoenix from 1934 to 2025
  • Chart: NOAA Climate at a Glance

Statistical Idea

  • We draw the best straight line through the recorded temperatures
  • The slope of that line tells us how much Phoenix becomes hotter each year
  • If the slope is positive this means that Phoenix is getting hotter

Math slide 1 How a daily average is calculated

\[ Average = (High + Low) / 2 \]

  • Each day, the high and low temperatures are averaged

Math slide 2 How a Yearly Average Is Calculated

\[ Yearly = (Jan + Feb + ... + Dec) / 12 \]

  • The 12 monthly averages are averaged to get one number per year

Phoenix Temperatures Over Time

  • The blue line rises about 0.05°F per year so 0.5°F per decade

Years Above and Below Average

  • The dotted line is the average temperature for all years (75.1°F)

R code for the plot

g <-ggplot(phx_clean, aes(x =Year, y=Value)) +
  geom_point()

g +
  geom_smooth(method ="lm", se =FALSE) +
  theme_classic()+

  xlab("Year") +
  ylab("Average Temperature (F)")

plotly slide

Conclusion

  • phoenix tempreture has increased 0.5F every decade
  • this is almost 5F warmer since 1934
  • the most recent years are above the long term average
  • so yes phoenix is getting hotter