In: Statistics and Probability
of a concrete slab (ksi): 2.5, 3.5, 2.2, 3.2, 2.9, 4.3, 3.7, 3.4, 3.1, 2.8, 1.9, and 2.1.
(a) Compute the mean and standard deviation of the above data set
(b) Compute the 25th, 50th, 75th and 90th percentile values of the compressive strength from the above dataset
(c) Construct a boxplot for the above data set
(d) Check if the largest value is an outlier following the z-score approach)
(a) Compute the mean and standard deviation of the above data set
mean=sum/total
=35.6/12
=2.967
mean=2.967
concrete slab(x) | mean(xbar) | x-xbar | (x-xbar)^2 | |
2.5 | 2.966667 | -0.46667 | 0.217778 | |
3.5 | 2.966667 | 0.533333 | 0.284444 | |
2.2 | 2.966667 | -0.76667 | 0.587778 | |
3.2 | 2.966667 | 0.233333 | 0.054444 | |
2.9 | 2.966667 | -0.06667 | 0.004444 | |
4.3 | 2.966667 | 1.333333 | 1.777777 | |
3.7 | 2.966667 | 0.733333 | 0.537777 | |
3.4 | 2.966667 | 0.433333 | 0.187777 | |
3.1 | 2.966667 | 0.133333 | 0.017778 | |
2.8 | 2.966667 | -0.16667 | 0.027778 | |
1.9 | 2.966667 | -1.06667 | 1.137778 | |
2.1 | 2.966667 | -0.86667 | 0.751112 | |
total | 5.586667 | |||
standard deviation=sqrt(5.586667/12-1) | ||||
standard deviation=sqrt(0.507879) | ||||
=0.712656 | ||||
standard deviation=0.712656
Solutionb:
Code in R:
ksac <- c(2.5, 3.5, 2.2, 3.2, 2.9, 4.3, 3.7, 3.4, 3.1, 2.8,
1.9, 2.1)
quantile(ksac,0.25)
quantile(ksac,0.50)
quantile(ksac,0.75)
quantile(ksac,0.90)
25 th percentile=2.425
50 th percentile=3
75 th percentile=3.425
90 th percentile=3.68
Solutionc:
there are no outliers seen from boxplot
Rcode t get boxplot is
outlier_values <- boxplot.stats(ksac$out) # outlier
values.
boxplot(ksac, main="concrete strength ", boxwex=0.1)
mtext(paste("Outliers: ", paste(outlier_values, collapse=", "),
cex=0.6)
Solutiond:
max=4.3
zscore=x-mean/sd
=4.3-2.966667/0.7126561
z=1.870935
Z values above 1.96 is an outler.here we got z=1.87
4.3 is not an outlier