Presample Analysis

presample_data <- c(31.6, 32.1, 31.9, 31.7, 32.2, 31.8, 32.0, 31.5, 31.9, 31.7)
mean_presample_data <- mean(presample_data)
sd_presample_data <- sd(presample_data)

Given the following data and attach the Historical plot, box plot and T-test

# Full sample data
data <- c(
  31.6, 32.1, 31.9, 31.7, 32.2, 31.8, 32.0, 31.5, 31.9, 31.7,
  32.1, 32.0, 32.1, 32.3, 31.9, 31.9, 32.3, 32.2, 31.9, 32.1,
  31.9, 31.9, 32.1, 31.6, 31.6, 31.9, 31.8, 32.1, 31.8, 31.7,
  32.3, 32.0, 32.0, 31.7, 31.9, 32.0, 31.7, 32.1, 31.9, 31.9,
  31.9, 32.4, 32.0, 31.8, 32.2, 31.7, 31.9
)
# Histogram
hist(data)

# Boxplot
boxplot(data)

# t-test against target CD = 32.0
target <- 32.0
t_result <- t.test(data, mu=target)
t_result
## 
##  One Sample t-test
## 
## data:  data
## t = -2.1047, df = 46, p-value = 0.04081
## alternative hypothesis: true mean is not equal to 32
## 95 percent confidence interval:
##  31.87512 31.99722
## sample estimates:
## mean of x 
##  31.93617