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 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.
Machine_1_output <- c(16.03, 16.04, 16.05, 16.05 ,16.02, 16.01 ,15.96, 15.98 ,16.02, 15.99)
Machine_2_output <- c(16.02 ,15.97, 15.96 ,16.01, 15.99 ,16.03, 16.04, 16.02, 16.01, 16)
The null hypothesis is that net volumetric means are the same for Machine 1 and Machine 2. The alternative hypothesis would be that net volumtric flows would be differnt
After looking at the probability plots for Machine 1 and Machine 2, Both machines apper to be normality distributed.
Machines_1_and_2 <- data.frame(Machine_1_output,Machine_2_output)
colnames(Machines_1_and_2) <- c("Machine 1","Machine 2")
qqnorm(Machine_1_output, main = "Output for Machine 1")
qqnorm(Machine_2_output, main = "Output for Machine 2")
Then, I looked at boxplots to see if the variances where equal and I determinted that they are not equal. I tried to stablize the variation by preforming a transform, and I found the transform didn’t help.
boxplot(Machine_1_output,Machine_2_output, main = " Machine 1 and Machine 2 output preformance", names = c("Machine 1","Machine 2"))
Machines_1_and_2_Log_transform <- log(Machines_1_and_2)
boxplot(Machines_1_and_2_Log_transform$`Machine 1`,Machines_1_and_2_Log_transform$`Machine 2`, main = " Machine 1 and Machine 2 output preformance", names = c("Machine 1","Machine 2"))
to preform the t- test, I set Var. Equal equal to false.
The p-value for the two sample test was 0.435. Since the p-value is greater than 0.05, I would accept the null hypothesis that the means are the same for Machine 1 and Machine 2.
The confidence interval in the difference in the is ( -0.01625123 , 0.03635123).
t.test(Machine_1_output,Machine_2_output, var.equal = FALSE, conf.level = 0.95)
##
## Welch Two Sample t-test
##
## data: Machine_1_output and Machine_2_output
## t = 0.79894, df = 17.493, p-value = 0.435
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.01635123 0.03635123
## sample estimates:
## mean of x mean of y
## 16.015 16.005
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.
I tested the Problem using Levenes test and I concluded the p- value to be 0.9699 to be greater than 0.05 so the buring times for Type 1 and Type 2 are the equal to each other.
##
## Classical Levene's test based on the absolute deviations from the mean
## ( none not applied because the location is not set to median )
##
## data: Burning_times_Cool_version$`Buring Times`
## Test Statistic = 0.0014598, p-value = 0.9699
I just put a box plot inside to see if the varance are equal. They appear to be equal.
boxplot(Burning_times$`Type 1`,Burning_times$`Type 2`,names = c("Type 1","Type 2"),col = c("Green","orange"))
I imported the data from an excel file and I tested used a boxplot to see if the variance are equal and they appear to be unequal so I preformed a log transform
photoresist_thickness <- read_excel(file.choose(),2)
boxplot(photoresist_thickness$`95 C`,photoresist_thickness$`100 C`,names = c("95 C","100 C"),col = c("Green","Orange"))
After the log transform, the variance looks like has been stabilized
photoresist_thickness_log_transfrom <- log(photoresist_thickness)
boxplot(photoresist_thickness_log_transfrom)
The p-value is 0.02362 and the null hypothesis would be rejected. The higher temperature causes to have a lower thickness.
The confidence interval is ( -infinity , -0.9508682). I guess this makes sense since I was looking at a one sided test.
t.test(photoresist_thickness_log_transfrom$`100 C`,photoresist_thickness_log_transfrom$`95 C`,alternative = "less", var.equal = TRUE)
##
## Two Sample t-test
##
## data: photoresist_thickness_log_transfrom$`100 C` and photoresist_thickness_log_transfrom$`95 C`
## t = -2.5046, df = 14, p-value = 0.01262
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
## -Inf -0.09507682
## sample estimates:
## mean of x mean of y
## 1.893530 2.213906
Looking at the qq plots, the 100 C plot looks to be normal but 95 C transform looks to be curving. I think it should be fine.
qqnorm(photoresist_thickness$`95 C`, main = "95 C Q-Q plot")
qqnorm(photoresist_thickness$`100 C`,main = "100 C Q-Q plot")