Analysis 1 The sample average does differ significantly from the university’s estimate of a 70 degree average temp. the actual mean is 62.73.
```{r} mydata <- read.csv(“https://raw.githubusercontent.com/drkblake/Data/main/DormTemps.csv”)
if (!require(“tidyverse”)) install.packages(“tidyverse”) library(tidyverse)
mydata\(V1 <- mydata\)RoomTemp test_value = 70
ggplot(mydata, aes(x = V1)) + geom_histogram(color = “black”, fill = “#1f78b4”) + geom_vline(aes(xintercept = mean(V1)))
mydata %>% select(V1) %>% summarise( count = n(), mean =
mean(V1, na.rm = TRUE), sd = sd(V1, na.rm = TRUE), min = min(V1, na.rm =
TRUE), max = max(V1, na.rm = TRUE), W Statistic =
shapiro.test(V1)\(statistic, `p-value` =
shapiro.test(V1)\)p.value)
t.test(mydata$V1, mu = test_value)
Analysis 2
14.8% are in range, 85% are out of range. significant difference between the university's claim.
```{r}
if (!require("gmodels"))
install.packages("gmodels")
if (!require("tidyverse"))
install.packages("tidyverse")
library(tidyverse)
library(gmodels)
library(tidyverse)
mydata$V1 <- mydata$Range
ggplot(mydata, aes(x = V1)) +
geom_bar(fill = "royalblue")
CrossTable(
mydata$V1,
prop.chisq = FALSE,
prop.t = FALSE,
prop.r = FALSE)
test <- chisq.test(table(mydata$V1))
test