2024-02-13

Introduction

This past summer, Arizona endured the hottest summer. In this presentation, you will be able to see the temperature trends along with a confidence interval of the average summer temperature, dew point and humidity of July 2023, the hottest month of 2023 summer.

Linear Regression Model (Temperature)

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

Linear Regression Model (Dew Point)

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

Linear Regression Model (Humidity)

## Warning in data(df): data set 'df' not found

Point Estimate of Temperature for the Summer (Latex)

Sum up all the data points and divide by the number of days in July to get a point estimate of the average temperature in July
\(\sum(Temperatures) = 3190.3\)
\(3190.3/31=102.91\)
The average temperature in July 2023 was 102.91F

Confidence Interval of Summer Temperature (Latex)

In order to get a confidence interval, we need a sample mean, z value (confidence level value), sample standard deviation, and sample size. We found the sample mean in the slide before this and we are going to approximate a 95% confidence interval so out z = 1.96. There are 31 days in July, therefore out sample size is 31. The Standard Deviation:
\({\sqrt\frac{\sum(x-102.91)^2}{n-1}} = 2.714988267\)

Using this data, we can create the confidence interval by:
\(102.91\pm1.96\times\frac{2.714988267}{\sqrt31}\)
The 95% confidence interval is:
\((101.95,103.87)\)

R code for Slide 2

ggplot(df, aes(x = Day..in.July., y = Ave..Temperature…F.,)) + geom_point(color = ‘orange’) + geom_smooth(method = “lm”, color = “red”)

Summary

July was the hottest month of the hottest summer Arizona has ever experienced. 95% of the data fell between 101.95 degrees and 103.87 degrees, with the average daily temperature being 102.91F.