- HIGH TEMPERATURES IN THE MONTH OF JULY
- IDENTIFY OUTLIERS
- AVERAGE AND MEDIAN TEMPS WITHOUT OUTLIERS - Notice the difference in slopes showing the mean increases without outliers.
2024-02-19
## [1] 96 90
## Days Temperature ## 1 2 115 ## 2 3 116 ## 3 4 113 ## 4 5 96 ## 5 6 115 ## 6 7 112 ## 7 8 113 ## 8 9 112 ## 9 10 110 ## 10 11 111 ## 11 12 111 ## 12 13 114 ## 13 14 116 ## 14 15 118 ## 15 16 114 ## 16 17 116 ## 17 18 118 ## 18 19 119 ## 19 20 119 ## 20 21 117 ## 21 22 118 ## 22 23 114 ## 23 24 116 ## 24 25 119 ## 25 26 118 ## 26 27 115 ## 27 28 90 ## 28 29 115 ## 29 30 112 ## 30 31 108
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
\( \frac{1}{Days} \sum_{i=i}^{Days} Temperature_{i} \)
iqr = IQR(data1$Temperature) up = quantile(data1$Temperature, 0.75) + 1.5*iqr low = quantile(data1$Temperature, 0.25) - 1.5*iqr
ggplot(data = data1, mapping = aes(x = Temperature, y = Days)) + geom_point(color = ‘blue’)+ geom_smooth(method = ‘lm’, se = FALSE) + theme_classic()
mean1 = mean(data1$Temperature) print(mean1)
## [1] 113.3333
median1 = median(data1$Temperature) print(median1)
## [1] 115
mean2 = mean(data2$Temperature) print(mean2)
## [1] 114.7857
median2 = median(data2$Temperature) print(median2)
## [1] 115
#median stays the same but the mean changes by about 1.5 degrees.