Problems

  • 3.7 (a)
  • 3.10 (a)
  • 3.20 (a,b)

Setup

Setup Libraries

# setup Libraries
library(dplyr)
library(knitr)
library(agricolae)
library(lawstat)
library(BSDA)
library(kableExtra)
library(tidyr)

Setup Data Frame

# DataFrame for Problem 3.7
cementTest <- data.frame(
  tensileStr = c(3129,3000,2865,2890,
                 3200,3300,2975,3150,
                 2800,2900,2985,3050,
                 2600,2700,2600,2765),
  mixTech    = as.factor((rep(1:4,each = 4))),
  idx        = as.factor(rep(1:4,4)))

# DataFrame for Problem 3.10
fiberStr <- data.frame(
  obv             = c(7 ,7 ,15,11, 9,
                      12,17,12,18,18,
                      14,19,19,18,18,
                      19,25,22,19,23,
                      7 ,10,11,15,11),
  cottonWtPercent = as.factor((rep(seq(15,35,5),each = 5))),
  idx        = as.factor(rep(1:5,5)))

# DataFrame for Problem 3.20
trappedAir <- data.frame(
  roddingLvl     = c(1530,1530,1440,
                     1610,1650,1500,
                     1560,1730,1530,
                     1500,1490,1510),
  compressiveStr = as.factor(rep(seq(10,25,5),each = 3)),
  idx        = as.factor(rep(1:3,4)))

3.7

The tensile strength of Portland cement is being studied. Four different mixing techniques can be used economically. A completely randomized experiment was conducted and the following data were collected:

mixTech 1 2 3 4
1 3129 3000 2865 2890
2 3200 3300 2975 3150
3 2800 2900 2985 3050
4 2600 2700 2600 2765

(a)

Is there evidence to support the claim that cotton content affects the mean tensile strength? Use \(\alpha = 0.05\).

cementAnalysis <- (aov(tensileStr ~ mixTech, data = cementTest))
cementTable <- summary(cementAnalysis)
Df Sum Sq Mean Sq F value Pr(>F)
mixTech 3 489740.2 163246.73 12.72811 0.0004887
Residuals 12 153908.2 12825.69

\(H_0: u_1 = u_2 = u_3 = u_4\)

\(H_1\): some/all mean is different from \(u_1\).

Since \(p = 0.000489 < 0.05\), we reject the null, turning to our alternate hypothesis that there is difference strength due to mixing.

3.10

A product developer is investigating the tensile strength of a new synthetic fiber that will be used to make cloth for men’s shirts. Strength is usually affected by the percentage of cotton used in the blend of materials for the fiber. The engineer conducts a completely randomized experiment with five levels of cotton content and replicates the experiment five times. The data are shown in the following table.

cottonWtPercent 1 2 3 4 5
15 7 7 15 11 9
20 12 17 12 18 18
25 14 19 19 18 18
30 19 25 22 19 23
35 7 10 11 15 11

(a)

Is there evidence to support the claim that cotton content affects the mean tensile strength? Use \(\alpha = 0.05\).

cottonAnalysis <- (aov(obv ~ cottonWtPercent, data = fiberStr))
cottonTable <- summary(cottonAnalysis)
Df Sum Sq Mean Sq F value Pr(>F)
cottonWtPercent 4 475.76 118.94 14.75682 9.1e-06
Residuals 20 161.20 8.06

\(H_0: u_1 = u_2 = u_3 = u_4 = u_5\)

\(H_1\): some/all mean is different from \(u_1\).

Since \(p = 9.13e-06 < 0.05\), we reject the null, turning to our alternate hypothesis that there is difference in tensile strength due to cotton content.

3.20

An article in the ACI Materials Journal (Vol. 84, 1987, pp. 213–216) describes several experiments investigating the rodding of concrete to remove entrapped air. A 3-inch by 6-inch cylinder was used, and the number of times this rod was used is the design variable. The resulting compressive strength of the concrete specimen is the response. The data are shown in the following table:

compressiveStr 1 2 3
10 1530 1530 1440
15 1610 1650 1500
20 1560 1730 1530
25 1500 1490 1510

(a)

  1. Is there any difference in compressive strength due to the rodding level? Use \(\alpha = 0.05\).
  2. Find the P-value for the F statistic in part (a).
trappedAirAnalysis <- (aov(roddingLvl ~ compressiveStr, data = trappedAir))
trappedAirTable <- summary(trappedAirAnalysis)
Df Sum Sq Mean Sq F value Pr(>F)
compressiveStr 3 28633.33 9544.444 1.865364 0.2137815
Residuals 8 40933.33 5116.667

\(H_0: u_1 = u_2 = u_3 = u_4\)

\(H_1\): some/all mean is different from \(u_1\).

since p = 0.214 > 0.05, we fail to reject the null, meaning there is no difference in means between rodding levels.

(b)

\(F = 1.865\),

\(p = 0.214\)

Source Code

# clear memory and environment
rm(list = ls())
gc()

# Homework 4
# IE 5342 - Dr. Timothy I. Matis
# Jesus R. Rosila Mares
# 21 Sept 2021
# Problems:

# 3.7  (a)
# 3.10 (a)
# 3.20 (a,b) 

# setup Libraries
library(dplyr)
library(agricolae)
library(knitr)
library(lawstat)
library(BSDA)
library(tidyr)

# 3.7 (a)
# The tensile strength of Portland cement is being studied.
#   Four different mixing techniques can be used economically.
#   A completely randomized experiment was conducted
#   and the following data were collected:

cementTest <- data.frame(
  tensileStr = c(3129,3000,2865,2890,
                 3200,3300,2975,3150,
                 2800,2900,2985,3050,
                 2600,2700,2600,2765),
  mixTech    = as.factor((rep(1:4,each = 4))),
  idx        = as.factor(rep(1:4,4)))

cementPrettyTable <- cementTest %>% spread(idx,tensileStr)
kable(cementPrettyTable) %>% kable_styling("striped",full_width = F)

# (a) Test the hypothesis that mixing techniques affect the
#     strength of the cement. Use alpha = 0.05.

# (a)
cementAnalysis <- (aov(tensileStr ~ mixTech, data = cementTest))
summary(cementAnalysis)

# H0: u1 = u2 = u3 = u4
# H1: some/all mean is different from u1

# since p = 0.000489 < 0.05, we reject the null, turning to our alternate 
# hypothesis that there is difference strength due to mixing.


# 3.10 (a)
# A product developer is investigating the tensile strength
#   of a new synthetic fiber that will be used to make cloth for
#   men's shirts. Strength is usually affected by the percentage of
#   cotton used in the blend of materials for the fiber. The engineer
#   conducts a completely randomized experiment with five levels
#   of cotton content and replicates the experiment five times. The
#   data are shown in the following table.

fiberStr <- data.frame(
  obv             = c(7 ,7 ,15,11, 9,
                      12,17,12,18,18,
                      14,19,19,18,18,
                      19,25,22,19,23,
                      7 ,10,11,15,11),
  cottonWtPercent = as.factor((rep(seq(15,35,5),each = 5))),
  idx        = as.factor(rep(1:5,5)))

fiberPrettyTable <- fiberStr %>% spread(idx,obv)
kable(fiberPrettyTable) %>% kable_styling("striped",full_width = F)

# (a) Is there evidence to support the claim that cotton content
#     affects the mean tensile strength? Use = 0.05.

# (a)
cottonAnalysis <- (aov(obv ~ cottonWtPercent, data = fiberStr))
summary(cottonAnalysis)

# H0: u1 = u2 = u3 = u4
# H1: some/all mean is different from u1

# since p = 9.13e-06 < 0.05, we reject the null, turning to our alternate 
# hypothesis that there is difference in tensile strength due to cotton content.


# 3.20 (a,b) 
# An article in the ACI Materials Journal (Vol. 84,
#   1987, pp. 213-216) describes several experiments investigating
#   the rodding of concrete to remove entrapped air.
#   A 3-inch by 6-inch cylinder was used, and the number of
#   times this rod was used is the design variable. The resulting
#   compressive strength of the concrete specimen is the
#   response. The data are shown in the following table:
 
trappedAir <- data.frame(
  roddingLvl     = c(1530,1530,1440,
                     1610,1650,1500,
                     1560,1730,1530,
                     1500,1490,1510),
  compressiveStr = as.factor(rep(seq(10,25,5),each = 3)),
  idx        = as.factor(rep(1:3,4)))

trappedPrettyTable <- trappedAir %>% spread(idx,roddingLvl)
kable(trappedPrettyTable) %>% kable_styling("striped",full_width = F)

# (a) Is there any difference in compressive strength due to
#     the rodding level? Use alpha = 0.05.
# (b) Find the P-value for the F statistic in part (a).

# (a)
trappedAirAnalysis <- (aov(roddingLvl ~ compressiveStr, data = trappedAir))
summary(trappedAirAnalysis)

# H0: u1 = u2 = u3 = u4
# H1: some/all mean is different from u1
# since p = 0.214 > 0.05, we fail to reject the null, meaning there is no 
# difference in means between rodding levels.

# (b)
# F = 1.865, p = 0.214