The effective life of insulating fluids at an accelerated load of 35 kV is being studied. Test data have been obtained for four types of fluids. The results from a completely randomized experiment were as follows:
| Fluid Type | Life (in hr) at 35kv Load | |||
| 1 | 17.6 | 18.9 | 16.3 | 17.4 |
| 2 | 16.9 | 15.3 | 18.6 | 17.1 |
| 3 | 21.4 | 23.6 | 19.4 | 18.5 |
| 4 | 19.3 | 21.1 | 16.9 | 17.5 |
a. Is there any indication that the fluids differ? Use α=0.05�=0.05.
b. Which fluid would you select, given that the objective is long life?
c. Analyze the residuals from this experiment. Are the basic analysis of variance assumptions satisfied?
Solution
A
#Data reading
Life <- c(17.6, 18.9, 16.3, 17.4, 20.1, 21.6, 16.9, 15.3, 18.6, 17.1, 19.5, 20.3, 21.4, 23.6, 19.4, 18.5, 20.5, 22.3, 19.3, 21.1, 16.9, 17.5, 18.3, 19.8)
FluidType <- c(rep(1,6), rep(2,6), rep(3,6), rep(4,6))
Data <- data.frame(Life, FluidType)
Data$FluidType <- as.factor(Data$FluidType)
str(Data)
## 'data.frame': 24 obs. of 2 variables:
## $ Life : num 17.6 18.9 16.3 17.4 20.1 21.6 16.9 15.3 18.6 17.1 ...
## $ FluidType: Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 2 2 2 2 ...
aov.model<-aov(Life~FluidType,data=Data)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## FluidType 3 30.16 10.05 3.047 0.0525 .
## Residuals 20 65.99 3.30
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion:
We fail to reject null hypothesis as no difference in fluids. P value suggest a possible difference at a slightly higher significance level
B
library(agricolae)
?LSD.test
## starting httpd help server ... done
LSD.test(aov.model,"FluidType",console=TRUE)
##
## Study: aov.model ~ "FluidType"
##
## LSD t Test for Life
##
## Mean Square Error: 3.299667
##
## FluidType, means and individual ( 95 %) CI
##
## Life std r se LCL UCL Min Max Q25 Q50 Q75
## 1 18.65000 1.952178 6 0.7415824 17.10309 20.19691 16.3 21.6 17.450 18.25 19.800
## 2 17.95000 1.854454 6 0.7415824 16.40309 19.49691 15.3 20.3 16.950 17.85 19.275
## 3 20.95000 1.879096 6 0.7415824 19.40309 22.49691 18.5 23.6 19.675 20.95 22.075
## 4 18.81667 1.554885 6 0.7415824 17.26975 20.36358 16.9 21.1 17.700 18.80 19.675
##
## Alpha: 0.05 ; DF Error: 20
## Critical Value of t: 2.085963
##
## least Significant Difference: 2.187666
##
## Treatments with the same letter are not significantly different.
##
## Life groups
## 3 20.95000 a
## 4 18.81667 ab
## 1 18.65000 b
## 2 17.95000 b
Conclusion:
As fluid type 3 has high avg it will have long life
Conclusion
C
plot(aov.model)
Conclusion
The residual plot show no anomalies, indicating that the assumptions of normal distribution and constant variance are met.
An experiment was performed to investigate the effectiveness of five insulating materials. Four samples of each material were tested at an elevated voltage level to accelerate the time to failure. The failure times (in minutes) are shown below:
a. Do all five materials have the same effect on mean failure time?
b. Plot the residuals versus the predicted response. Construct a normal probability plot of the residuals. What information is conveyed by these plots?
c. Based on your answer to part (b) conduct another analysis of the failure time data and draw appropriate conclusions.
| Material | Failure time (minutes) | ||
| 1 | 110 | 157 | 194 |
| 2 | 1 | 2 | 4 |
| 3 | 880 | 1256 | 5276 |
| 4 | 495 | 7040 | 5307 |
| 5 | 7 | 5 | 29 |
SOLUTION
Null hypothesis : Ho: μi−μj=0
Alternative Hypothesis : Ha: μi−μj≠0
#data reading
FailTime <- c(110, 157, 194, 178, 1, 2, 4, 18, 880, 1256, 5276, 4355, 495, 7040, 5307, 10050, 7, 5, 29, 2)
material <- c(rep(1,4), rep(2,4), rep(3,4), rep(4,4), rep(5,4))
Data <- data.frame(FailTime,material)
Data$material <- as.factor(Data$material)
str(Data)
## 'data.frame': 20 obs. of 2 variables:
## $ FailTime: num 110 157 194 178 1 ...
## $ material: Factor w/ 5 levels "1","2","3","4",..: 1 1 1 1 2 2 2 2 3 3 ...
aov.model<-aov(FailTime~material,data=Data)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## material 4 103191489 25797872 6.191 0.00379 **
## Residuals 15 62505657 4167044
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion
We reject null hypothesis it does not have similar mean effect on type of fluids.
B
library(ggfortify)
## Loading required package: ggplot2
library(ggplot2)
autoplot(aov.model)
Conclusion
The residual vs fitted plot indicates a lack of constant variance due to non rectangular pattern formed by maximum and minimum points which signifies ANOVA violation.
C
boxplot(Data$FailTime~Data$material,xlab="Material Type",ylab="Failure Time",main="Boxplot of Observations")
library(MASS)
boxcox(FailTime~material)
LogFailTime <- log(FailTime)
boxplot(LogFailTime~Data$material,xlab="Material Type",ylab="Failure Time",main="Boxplot of Observations")
DataT<-data.frame(LogFailTime,material)
DataT$material <- as.factor(DataT$material)
aovmodelT<-aov(LogFailTime~material,data=DataT)
autoplot(aovmodelT)
kruskal.test(FailTime,material,data=Data)
##
## Kruskal-Wallis rank sum test
##
## data: FailTime and material
## Kruskal-Wallis chi-squared = 16.873, df = 4, p-value = 0.002046
Conclusion
We will reject null hypothesis
A semiconductor manufacturer has developed three different methods for reducing particle counts on wafers. All three methods are tested on five different wafers and the after treatment particle count obtained. The data are shown below
| Method | Count | ||
| 1 | 31 | 10 | 21 |
| 2 | 62 | 40 | 24 |
| 3 | 53 | 27 | 120 |
a. Do all methods have the same effect on mean particle count?
b. Plot the residuals versus the predicted response. Construct a normal probability plot of the residuals. Are there potential concerns about the validity of the assumptions?
c. Based on your answer to part (b) conduct another analysis of the particle count data and draw appropriate conclusions.
Count <- c(31, 10, 21, 4, 1, 62, 40, 24, 30, 35, 53, 27, 120, 97, 68)
a <- c(rep(1,5), rep(2,5), rep(3,5))
Data <- data.frame(Count,a)
Data$a <- as.factor(Data$a)
str(Data)
## 'data.frame': 15 obs. of 2 variables:
## $ Count: num 31 10 21 4 1 62 40 24 30 35 ...
## $ a : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 2 2 2 2 2 ...
aov.model<-aov(Count~a,data=Data)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## a 2 8964 4482 7.914 0.00643 **
## Residuals 12 6796 566
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion
We reject null hypothesis.
B
autoplot(aov.model)
Residuals vs Fitted” plot spread is inconsistent
C
library(MASS)
boxplot(Data$Count~Data$a,xlab="Method Type",ylab="Particle Count",main="Boxplot of Observations")
boxcox(Count~a)
boxplot(Count~Data$a,xlab="Method Type",ylab="Particle Count",main="Boxplot of Observations")
boxcox(Count~a)
DataT <- data.frame(Count,a)
DataT$a <- as.factor(DataT$a)
str(DataT)
## 'data.frame': 15 obs. of 2 variables:
## $ Count: num 31 10 21 4 1 62 40 24 30 35 ...
## $ a : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 2 2 2 2 2 ...
aov.modelT<-aov(Count~a,data=DataT)
summary(aov.modelT)
## Df Sum Sq Mean Sq F value Pr(>F)
## a 2 8964 4482 7.914 0.00643 **
## Residuals 12 6796 566
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
autoplot(aov.modelT)
Conclusion
ANOVA analysis signifies a significant effect of method type, validating the model.
Life <- c(17.6, 18.9, 16.3, 17.4, 20.1, 21.6, 16.9, 15.3, 18.6, 17.1, 19.5, 20.3, 21.4, 23.6, 19.4, 18.5, 20.5, 22.3, 19.3, 21.1, 16.9, 17.5, 18.3, 19.8)
FluidType <- c(rep(1,6), rep(2,6), rep(3,6), rep(4,6))
Data <- data.frame(Life,FluidType)
Data$FluidType <- as.factor(Data$FluidType)
str(Data)
## 'data.frame': 24 obs. of 2 variables:
## $ Life : num 17.6 18.9 16.3 17.4 20.1 21.6 16.9 15.3 18.6 17.1 ...
## $ FluidType: Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 2 2 2 2 ...
Null: H0: μ1 = μ2 = μ3 = μ4
Alternate: H1: μi ≠ μj for at least one pair (i,j)
kruskal.test(Life~FluidType,data=Data)
##
## Kruskal-Wallis rank sum test
##
## data: Life by FluidType
## Kruskal-Wallis chi-squared = 6.2177, df = 3, p-value = 0.1015
Life <- c(17.6, 18.9, 16.3, 17.4, 20.1, 21.6, 16.9, 15.3, 18.6, 17.1, 19.5, 20.3, 21.4, 23.6, 19.4, 18.5, 20.5, 22.3, 19.3, 21.1, 16.9, 17.5, 18.3, 19.8)
FluidType <- c(rep(1,6), rep(2,6), rep(3,6), rep(4,6))
Data <- data.frame(Life, FluidType)
Data$FluidType <- as.factor(Data$FluidType)
str(Data)
aov.model<-aov(Life~FluidType,data=Data)
summary(aov.model)
LSD.test(aov.model,"FluidType",console=TRUE)
plot(aov.model)
FailTime <- c(110, 157, 194, 178, 1, 2, 4, 18, 880, 1256, 5276, 4355, 495, 7040, 5307, 10050, 7, 5, 29, 2)
material <- c(rep(1,4), rep(2,4), rep(3,4), rep(4,4), rep(5,4))
Data <- data.frame(FailTime,material)
Data$material <- as.factor(Data$material)
str(Data)
aov.model<-aov(FailTime~material,data=Data)
summary(aov.model)
library(ggfortify)
library(ggplot2)
autoplot(aov.model)
library(MASS)
boxplot(Data$FailTime~Data$material,xlab="Material Type",ylab="Failure Time",main="Boxplot of Observations")
boxcox(FailTime~material)
LogFailTime <- log(FailTime)
boxplot(LogFailTime~Data$material,xlab="Material Type",ylab="Failure Time",main="Boxplot of Observations")
DataT<-data.frame(LogFailTime,material)
DataT$material <- as.factor(DataT$material)
str(DataT)
aovmodelT<-aov(LogFailTime~material,data=DataT)
plot(aovmodelT)
?kruskal.test
kruskal.test(FailTime,material,data=Data)
Count <- c(31, 10, 21, 4, 1, 62, 40, 24, 30, 35, 53, 27, 120, 97, 68)
a <- c(rep(1,5), rep(2,5), rep(3,5))
Data <- data.frame(Count,a)
Data$a <- as.factor(Data$a)
str(Data)
aov.model<-aov(Count~a,data=Data)
summary(aov.model)
autoplot(aov.model)
library(MASS)
boxplot(Data$Count~Data$a,xlab="Method Type",ylab="Particle Count",main="Boxplot of Observations")
boxcox(Count~a)
boxplot(Count~Data$a,xlab="Method Type",ylab="Particle Count",main="Boxplot of Observations")
boxcox(Count~a)
DataT <- data.frame(Count,a)
DataT$a <- as.factor(DataT$a)
str(DataT)
aov.modelT<-aov(Count~a,data=DataT)
summary(aov.model)
autoplot(aov.model)
Life <- c(17.6, 18.9, 16.3, 17.4, 20.1, 21.6, 16.9, 15.3, 18.6, 17.1, 19.5, 20.3, 21.4, 23.6, 19.4, 18.5, 20.5, 22.3, 19.3, 21.1, 16.9, 17.5, 18.3, 19.8)
FluidType <- c(rep(1,6), rep(2,6), rep(3,6), rep(4,6))
Data <- data.frame(Life,FluidType)
Data$FluidType <- as.factor(Data$FluidType)
str(Data)
kruskal.test(Life~FluidType,data=Data)