In: Math
1) The R-Code to read the data:
year = c(1912:1971)
dt = data.frame(cbind(year,nhtemp))
1.a) the mean, sample standard deviation, sample skewness, and sample kurtosis of nhtemp is obtained as:
mean(nhtemp)
51.16
sd(nhtemp)
1.265608
library(e1071)
skewness(nhtemp)
-0.07178758
kurtosis(nhtemp)
0.3832752
1.b) The skewness of mean annual temperature (in F) is -0.07178758 which indicates that the distribution of the mean annual temperature (in F) in New Haven, Connecticut is skewed towards the left. While, the kurtosis of mean annual temperature (in F) is 0.3832752, which indicates that the distribution of the mean annual temperature (in F) in New Haven, Connecticut is leptokurtic.
1.c) histogram and boxplot of nhtemp is given by:
hist(nhtemp, main = paste("Histogram of the Mean Annual
Temperature (in F)
in New Haven, Connecticut"), xlab = "Mean Annual Temperature")
Thus, the histogram plot shows that the distribution is slightly skewed towards left and is leptokurtic.
boxplot(nhtemp, main = paste("Boxplot of the Mean Annual
Temperature (in F)
in New Haven, Connecticut"))
From the boxplot we observe that there are 4 outliers in total, 2 of which are less than 3/2 times of the Inter Quartile Range and the other 2 is greater than 3/2 times of the Inter Quartile Range. The Inter Quartile Rangeis slightly shifted upwards indicating skewness towards left and leptokurtic.
1.d) The index Plot of nhtemp is given by:
plot(years, nhtemp, type = "l", main = paste("Index Plot of the
Mean Annual Temperature (in F)
in New Haven, Connecticut"), xlab = "Years", ylab = "Mean Annual
Temperature")
The index plot of the given data gives us the trend or pattern of the mean annual temperature where the boxplot and histogram where giving us the distribution of the mean annual. temperature.
2.a) the mean, sample standard deviation, sample skewness, and sample kurtosis of co2 is obtained as:
mean(co2)
337.0535
sd(co2)
14.96622
library(e1071)
skewness(co2)
0.2419156
kurtosis(co2)
-1.223013
2.b) The skewness of the amount of carbon dioxide (CO2) in the atmosphere is 0.2419156 which indicates that the distribution of the amount of carbon dioxide (CO2) in the atmosphere is skewed towards the right. While, the kurtosis of amount of carbon dioxide (CO2) in the atmosphere is -1.223013, which indicates that the distribution of the amount of carbon dioxide (CO2) in the atmosphere is platykurtic.
1.c) histogram and boxplot of co2 is given by:
hist(co2, main = paste("Histogram of the Amount of Carbon
Dioxide
(CO2) in the atmosphere"), xlab = "Amount of Carbon Dioxide")
Thus, the histogram plot shows that the distribution is slightly skewed towards right and is platykurtic.
boxplot(co2, main = paste("Boxplot of the Amount of Carbon
Dioxide
(CO2) in the atmosphere"))
From the boxplot we observe that there are no outliers. The Inter Quartile Rangeis slightly shifted downwards indicating skewness towards right and platykurtic.
2.d) The index Plot of nhtemp is given by:
plot(co2, type = "l", main = paste("Index Plot of the Amount of
Carbon Dioxide
(CO2) in the atmosphere"), xlab = "Years", ylab = "Amount of Carbon
Dioxide (CO2)")
The index plot of the given data gives us the trend or pattern of the Amount of Carbon Dioxide (CO2) in the atmosphere where the boxplot and histogram where giving us the distribution of the Amount of Carbon Dioxide (CO2).
3.a) The boxplot of co2 is given by:
boxplot(islands, main = paste("Boxplot of the Areas in thousands of square miles of the landmasses"))
From the boxplot we observe that there are many outliers. The Inter Quartile Range is totally shifted downwards indicating skewness towards right and platykurtic.
The outliers are :
Africa : 11506, Antarctica: 5500, Asia : 16988, Australia : 2968, Europe : 3745, North America : 9390.