data <- c(5.3, 6.1, 6.2, 6.2, 6.2, 6.5, 6.7, 6.7, 6.8, 7.1, 7.1, 7.1,
7.3, 7.4, 7.4, 7.4, 7.6, 7.6, 7.6, 7.7, 7.7, 7.8, 7.9, 7.9,
7.9, 8.0, 8.1, 8.1, 8.2, 8.2, 8.2, 8.4, 8.5, 8.7, 8.7, 8.7,
8.8, 8.8, 9.0, 9.1, 9.2, 9.3, 9.5, 9.5, 9.6, 9.6, 9.7, 10.0)
1- The Stem plot
stem(data)
##
## The decimal point is at the |
##
## 5 | 3
## 5 |
## 6 | 1222
## 6 | 5778
## 7 | 1113444
## 7 | 666778999
## 8 | 0112224
## 8 | 577788
## 9 | 0123
## 9 | 55667
## 10 | 0
(max(data) - min(data))/4
## [1] 1.175
my.table <- data.frame(ctgrs = 1:4, low.bound = c(5.20,6.38,7.56,8.74), up.bound = c(6.38,7.56,8.74,10), freq = c(5,11,20,12),
rel.freq = c(.10,.23,.42,.25), cum.rel.freq = c(.10,.33,.75,1))
my.table
## ctgrs low.bound up.bound freq rel.freq cum.rel.freq
## 1 1 5.20 6.38 5 0.10 0.10
## 2 2 6.38 7.56 11 0.23 0.33
## 3 3 7.56 8.74 20 0.42 0.75
## 4 4 8.74 10.00 12 0.25 1.00
3-
mean(data) # the mean
## [1] 7.939583
median(data) # the median
## [1] 7.9
range(data) # the range
## [1] 5.3 10.0
quantile(data)
## 0% 25% 50% 75% 100%
## 5.300 7.250 7.900 8.725 10.000
The q1 = 7.25, and q3 = 8.725, iqr = q3 - q1 = 8.725 - 7.25 = 1.475
4-
iqr <- 1.475
q1 <- 7.25
q3 <- 8.725
f1 <- q1 - 1.5 * iqr
f3 <- q3 + 1.5 * iqr
F1 <- q1 - 2 * 1.5 * iqr
F3 <- q3 + 2 * 1.5 * iqr
new.data <- c(data, c(f1, f3, F1, F3))
boxplot(new.data, main = "Distribution of the data")
5- Based on the picture, it is reasonable to assume that the data come from a normal distribution