2025-11-01

About the Dataset

  • Airquality Dataset: New York air quality measurements from May–September 1973
  • Includes variables Ozone, Solar Radiation, Wind, Temperature, Month, and Day
  • Contains daily measurements of pollution and weather
  • Dataset cleaned using na.omit() to remove missing values
head(data)
##   Ozone Solar.R Wind Temp Month Day
## 1    41     190  7.4   67     5   1
## 2    36     118  8.0   72     5   2
## 3    12     149 12.6   74     5   3
## 4    18     313 11.5   62     5   4
## 7    23     299  8.6   65     5   7
## 8    19      99 13.8   59     5   8

Scatterplot: Ozone vs Temperature

Boxplot: Wind Speed by Month

Bar Chart: Average Ozone by Month

3D Scatterplot: Ozone vs Temperature vs Wind

Statistical Slide

## 
## Call:
## lm(formula = Ozone ~ Temp + Wind, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -42.156 -13.216  -3.123  10.598  98.492 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -67.3220    23.6210  -2.850  0.00524 ** 
## Temp          1.8276     0.2506   7.294 5.29e-11 ***
## Wind         -3.2948     0.6711  -4.909 3.26e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 21.73 on 108 degrees of freedom
## Multiple R-squared:  0.5814, Adjusted R-squared:  0.5736 
## F-statistic: 74.99 on 2 and 108 DF,  p-value: < 2.2e-16

Insights

  • Higher temperatures correspond to higher ozone levels, indicating warmer days worsen air quality
  • Stronger wind speeds tend to reduce ozone, likely due to pollutant dispersion
  • Temperature, wind, and oslar radiation together explain much of the daily variability in ozone.