Question 2.24

Two machines are used for filling plastic bottles with a net volume of 16.0 ounces. The filling processes can be assumed to be normal, with standard deviation of σ1 = 0.015 and σ2 = 0.018. The quality engineering department suspects that both machines fill to the same net volume, whether or not this volume is 16.0 ounces. An experiment is performed by taking a random sample from the output of each machine.

Part a. State the hypotheses that should be tested in this experiment.

Answer: Null Hypothesis: Ho: mu1 = mu2 or Ho: mu1-mu2 = 0

Alternative Hypothesis: Ha: mu1 ≠ mu2 or Ha: mu1-mu2 ≠ 0

Part b. Test these hypotheses using α=0.05. What are your conclusions?

Part c. What is the P-value for the test?

Part d. Find a 95 percent confidence interval on the difference in the mean fill volume for the two machines.

Answer: To find the answers of part b,c and d, we’ll perform Two Sample T-Test with pooled variance. As given in problem description the filling process can be assumed to be normal. The standard deviations in this case are 0.015 and 0.018, which are quite close, and thus they can be pooled together. So we have satisfied both the assumptions and we can proceed to perform the Two Sample T-Test with pooled variance. (P.S.: I confirmed from Dr. Matis that the Standard Deviations in this case can be pooled together to perform the Two Sample T-Test with Pooled Variance. This question can also be done by calculating Z Statistic, but this is my preferred method).

Reading Data

Pop1 <- c(16.03, 16.04, 16.05, 16.05, 16.02, 16.01, 15.96, 15.98, 16.02, 15.99)
Pop2 <- c(16.02, 15.97, 15.96, 16.01, 15.99, 16.03, 16.04, 16.02, 16.01, 16.00)

Two Sample T-Test

t.test(Pop1,Pop2,var.equal=TRUE, alternative = "two.sided")
## 
##  Two Sample t-test
## 
## data:  Pop1 and Pop2
## t = 0.79894, df = 18, p-value = 0.4347
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.01629652  0.03629652
## sample estimates:
## mean of x mean of y 
##    16.015    16.005

Answer Part b. Sample averages for Population 1 and 2 are 16.015 and 16.005 respectively.

T statistic = 0.79894

Since our P-value is much greater than 0.05, so we fail to reject Ho. (In other words we accept it)

Answer Part c. P-value for the test = 0.4347

Answer Part d. 95% Confidence Interval for difference in the mean fill volumes of two machines. Lower bound for the confidence interval is -0.016296 and upper bound 0.036296.

-0.016296 <= mu1-mu2 <= 0.036296

Question 2.26

The following are the burning times (in minutes) of chemical flares of two different formulations. The design engineers are interested in both the mean and variance of the burning times.

Part a. Test the hypothesis that the two variances are equal. Use a=0.05.

Answer: In this case, we have our two hypotheses as:

Null Hypothesis: H0: Sigma1^2 = Sigma2^2

Alternative Hypothesis: Ha: Sigma1^2 ≠ Sigma2^2

We’ll use Levene’s Test to test these hypotheses.

Reading Data

Pop <- c(65, 81, 57, 66, 82, 82, 67, 59, 75, 70, 64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
B <- c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B")
dat <- cbind(Pop, B)
dat1 <- data.frame(dat)
str(dat1)
## 'data.frame':    20 obs. of  2 variables:
##  $ Pop: chr  "65" "81" "57" "66" ...
##  $ B  : chr  "A" "A" "A" "A" ...
dat1$B <- as.factor(dat1$B)
dat1$Pop <- as.numeric(dat1$Pop)
str(dat1)
## 'data.frame':    20 obs. of  2 variables:
##  $ Pop: num  65 81 57 66 82 82 67 59 75 70 ...
##  $ B  : Factor w/ 2 levels "A","B": 1 1 1 1 1 1 1 1 1 1 ...

Levene’s Test

library(lawstat)
levene.test(dat1$Pop,dat1$B, location = "mean")
## 
##  Classical Levene's test based on the absolute deviations from the mean
##  ( none not applied because the location is not set to median )
## 
## data:  dat1$Pop
## Test Statistic = 0.0014598, p-value = 0.9699

So as per Levene’s test, our test statistic: 0.0014598

Our P-value: 0.9699

So we fail to reject Ho, and thus the variances are equal.

Part b. Using the results of (a), test the hypotheses that the mean burning times are equal. Use α = 0.05. What is the P-value for this test?

Answer: Now, we have to do a two sample T-test to test the hypothesis that whether the mean burning times are equal. That will also give us the p-value.

Null Hypothesis: Ho: mu3 = mu4 or Ho: mu3-mu4 = 0

Alternative Hypothesis: Ha: mu3 ≠ mu4 or Ha: mu3-mu4 ≠ 0

Two Sample T-Test

Pop3 <- c(65, 81, 57, 66, 82, 82, 67, 59, 75, 70)
Pop4 <- c(64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
t.test(Pop3,Pop4,var.equal=TRUE, alternative = "two.sided")
## 
##  Two Sample t-test
## 
## data:  Pop3 and Pop4
## t = 0.048008, df = 18, p-value = 0.9622
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -8.552441  8.952441
## sample estimates:
## mean of x mean of y 
##      70.4      70.2

So, our t statistic: 0.048

P-value: 0.9622

Since P-value is much greater than 0.05, thus we fail to reject Ho. In other words, mean burning times are equal.

Question 2.29

Photoresist is a light-sensitive material applied to semiconductor wafers so that the circuit pattern can be imaged on to the wafer. After application, the coated wafers are baked to remove the solvent in the photoresist mixture and to harden the resist. Here are measurements of photoresist thickness (in kA) for eight wafers baked at two different temperatures. Assume that all of the runs were made in random order.

Part a. Is there evidence to support the claim that the higher baking temperature results in wafers with a lower mean photoresist thickness? Use a = 0.05.

Answer: So, we have to formulate two hypotheses to test whether the mean photoresist thickness is equal for the two populations or does higher baking temperature results in wafers with a lower mean photoresist thickness. We will do a Two sample T-test with pooled variance to test these hypotheses.

Null Hypothesis: Ho: muC = muD or Ho: muC - muD = 0

Alternative Hypothesis: Ha: muC > muD or Ha: muC-muD > 0

Reading Data

PopC <- c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
PopD <- c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)

Equality of Variance

boxplot(PopC,PopD, main= "Box plot of datasets PopC & PopD", ylab= "Thickness",names=c("95 C","100 C"))

Two Sample T-Test

t.test(PopC,PopD,alternative = "greater", var.equal=TRUE)
## 
##  Two Sample t-test
## 
## data:  PopC and PopD
## t = 2.6751, df = 14, p-value = 0.009059
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  0.8608158       Inf
## sample estimates:
## mean of x mean of y 
##  9.366625  6.846625

T statistic: 2.6751

P-value: 0.009059

Since P-value is much smaller than 0.05, thus we have to reject Ho. In other words, mean photoresist thickness is lower at higher baking temperatures.

Part b. What is the P-value for the test conducted in part (a)?

Answer: P-value is 0.009059

Part c. Find a 95 percent confidence interval on the difference in means. Provide a practical interpretation of this interval.

Answer: Lower bound for 95% Confidence Interval is 0.8608158.

0.8608158 <= muC - muD

Since the lower bound for 95% confidence interval is 0.8608158, and our P-value is 0.009059, thus there’s a difference in photoresist thickness for the two populations (two different temperatures).

Part e. Check the assumption of normality for the data from this experiment.

Answer: To check the assumption of normality for the populations C and D, we’ll draw their normal probability plots.

Normal Probability Plots

qqnorm(PopC,main="Normal Probability Plot for PopC at 95 C", ylab = "Photoresist Thickness")
qqline(PopC)

qqnorm(PopD, main="Normal Probability Plot for PopD at 100 C", ylab = "Photoresist Thickness")
qqline(PopD)

Although normal probability plots aren’t perfect, they still are very close to normality and thus can be assumed normal.