Read in data for energy cost
energy= read.csv("energy_cost.csv", header = TRUE)
Problem 3g
hist(energy$cost, xlab = "Monthly Energy Bill")
Problem 3h
boxplot(energy$cost, xlab = "Monthly Energy Bill")
Problem 3i
mean=mean(energy$cost)
print(mean)
## [1] 174.0667
sd=sd(energy$cost)
print(sd)
## [1] 49.49534
nrow(energy)
## [1] 30
summary(energy$cost)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 64.0 147.5 181.0 174.1 203.0 274.0
Problem 3n
qt(0.025, 29)
## [1] -2.04523
Problem 3q
pt(-2.87, 29)
## [1] 0.00379273