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 deviations of \(\sigma 1= 0.015\) and \(\sigma 1= 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.
Machine 1 (16.03,16.04,16.05,16.05,16.02,16.01,15.96,15.98,16.02,15.99)
Machine 2 (16.02,15.97,15.96,16.01,15.99,16.03,16.04,16.02,16.01,16.00)
(a) State the hypotheses that should be tested in this experiment.
(b) Test these hypotheses using \(\alpha = 0.05\) What are your conclusions?
(c) Find the P-value for this test.
(d) Find a 95 percent confidence interval on the difference in mean fill volume for the two machines.
To solve this question, we are going to preform Two Sample T-Test with Pooled Variance, in which we are going to consider that both machine standard deviation are quit close to each other and pooled together.
Null Hypotheses: \[H_{0}:\mu 1 = \mu2 \]
\[ H_{0}: \mu 1 - \mu2 = 0 \]
Alternative Hypotheses :\[H_{a}: \mu 1 \neq \mu2 \]
\[ H_{a}: \mu 1 - \mu2 \neq 0 \]
Reading Data
m1<-c(16.03,16.04,16.05,16.05,16.02,16.01,15.96,15.98,16.02,15.99)
m2<-c(16.02,15.97,15.96,16.01,15.99,16.03,16.04,16.02,16.01,16.00)
t.test(m1,m2,var.equal =TRUE,alternative = "two.sided" )
##
## Two Sample t-test
##
## data: m1 and m2
## 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
Comments
Sample mean of Machine 1 population is 16.015, and sample mean of machine 2 population is 16.005.
T statistics = 0.79894
P value of the teat is higher that 0.05 which mean we are fail reject \(H_{o}\) hypothesis.
P-Value of the test 0.4347
95 % confidence level
-0.01629652 \(\leq \mu1-\mu2 \leq\) 0.03629652
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.
Type 1 ( 65, 81, 57, 66, 82, 82, 67, 59, 75, 70)
Type 2 ( 64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
(a) Test the hypothesis that the two variances are equal. Use \(\alpha= 0.05\).
(b) Using the results of (a), test the hypothesis that the mean burning times are equal. Use \(\alpha= 0.05\). What is the P-value for this test?
In the hypotheses of two variance are equal, we are going to use Levene’s Test.
Null hypotheses:
\[ H_{0} : \sigma_{1}^{2} = \sigma_{2}^{2} \]
\[ H_{0} : \sigma_{1}^{2} - \sigma_{2}^{2} =0 \]
Alternative hypothesis: \[H_{a} : \sigma_{1}^{2} \neq \sigma_{2}^{2}\]
\[H_{a} : \sigma_{1}^{2} - \sigma_{2}^{2} \neq 0\]
Reading data
pop <-c(65, 81, 57, 66, 82, 82, 67, 59, 75, 70, 64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
level <-c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B")
dat <-cbind(pop,level)
dat1 <-data.frame(dat)
str(dat1)
## 'data.frame': 20 obs. of 2 variables:
## $ pop : chr "65" "81" "57" "66" ...
## $ level: chr "A" "A" "A" "A" ...
dat1$level <-as.factor(dat1$level)
dat1$pop <-as.numeric(dat1$pop)
str(dat)
## chr [1:20, 1:2] "65" "81" "57" "66" "82" "82" "67" "59" "75" "70" "64" ...
## - attr(*, "dimnames")=List of 2
## ..$ : NULL
## ..$ : chr [1:2] "pop" "level"
library(lawstat)
levene.test(dat1$pop, dat1$level,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
P- value of test is 0.9699, which mean we are fail to reject \(H_{0}\) hypotheses.
Pop1 <-c(65, 81, 57, 66, 82, 82, 67, 59, 75, 70)
Pop2 <-c(64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
t.test(Pop1,Pop2,var.equal=TRUE, alternative = "two.sided")
##
## Two Sample t-test
##
## data: Pop1 and Pop2
## 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
T statistic = 0.048008
P- value pf test is 0.9622, is greater than 0.05, we are fail to reject null hypotheses. In words mean burning time is equal.
Photo-resist 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 photo-resist mixture and to harden the resist. Here are measurements of photo-resist thickness (in kA) for eight wafers baked at two different temperatures. Assume that all of the runs were made in random order.
At Temp 95 \(^{\circ}C\) - (11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
At Temp 100 \(^{\circ}C\) - (5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)
(a) Is there evidence to support the claim that the higher baking temperature results in wafers with a lower mean photo resist thickness? Use\(\alpha = 0.05\).
(b) What is the P-value for the test conducted in part (a)?
(c) Find a 95 percent confidence interval on the difference in means. Provide a practical interpretation of this interval.
(e) Check the assumption of normality of the photo-resist thickness.
We will have to do Two Sample T- Test with pooled Variances to support the claim that higher baking temperature results in wafers with a lower mean photo resist thickness.
Null Hypotheses: \[H_{0}:\mu A = \mu B \]
\[ H_{0}: \mu A - \mu B = 0 \]
Alternative Hypotheses :\[H_{a}: \mu A \neq \mu B \]
\[ H_{a}: \mu A - \mu B \neq 0 \]
Data Reading
#Question 2.29
popA<-c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
popB<-c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)
boxplot(popA,popB, main= "Box plot of data PopA & PopB", ylab= "Thickness",names=c("95 C","100 C"))
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
t.test(popA,popB,var.equal= TRUE)
##
## Two Sample t-test
##
## data: popA and popB
## t = 2.6751, df = 14, p-value = 0.01812
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.4995743 4.5404257
## sample estimates:
## mean of x mean of y
## 9.366625 6.846625
T statistic = 2.6751
P-Value of test = 0.001812 which is low than \(\alpha =0.05\) which mean we fall to Null Hypothesis. In other words, mean photo-resist thickness is lower at higher baking temperatures.
P-Value of Test = 0.001812
Since the lower bound for 95% confidence interval is 0.8608158, and our P-value is 0.009059, thus there’s a difference in photo-resist thickness for the two populations (two different temperatures).
For Pop A:
qqnorm(popA,main="Normal Probability Plot for popA at 95 C", ylab = "Photo-resist Thickness")
qqline(popA)
For Pop B:
qqnorm(popB,main="Normal Probability Plot for popB at 100 C", ylab = "Photo-resist Thickness")
qqline(popB)
Remarks:
Normal probability plots aren’t perfect, they still are very close to normality and thus can be assumed normal.