Null Hypothesis: Machine A and Machine B have the same mean net filling volume.
Alternative Hypothesis: Machine A and Machine B have different mean net filling volume.
volume_A <- c(16.03, 16.04, 16.05, 16.05, 16.02, 16.01, 15.96, 15.98, 16.02, 15.99)
volume_B <- c(16.02, 15.97, 15.96, 16.01, 15.99, 16.03, 16.04, 16.02, 16.01, 16.00)
qqnorm(volume_A)
qqline(volume_A)
qqnorm(volume_B)
qqline(volume_B)
boxplot(volume_A, volume_B)
t.test(volume_A, volume_B, paired = FALSE, var.equal = TRUE)
##
## Two Sample t-test
##
## data: volume_A and volume_B
## 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
c.
p-value = 0.4347, which is much larger than 0.05, then we cannot reject the null hypothesis, which means there is no statistically significant difference between the fill volumes of Machine 1 and Machine 2 based on the sample data.
d.
95 percent confidence interval: (-0.01629652 0.03629652).
a.
library(lawstat)
type_1 <- c(65, 81, 57, 66, 82, 82, 67, 59, 75, 70)
type_2 <- c(64, 71, 83, 59, 65, 56, 69, 74, 82, 79)
qqnorm(type_1)
qqnorm(type_2)
boxplot(type_1, type_2)
data <- c(type_1, type_2)
group <- factor(rep(1:2, c(length(type_1), length(type_2))))
levene.test(data, group, 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: data
## Test Statistic = 0.0014598, p-value = 0.9699
p-value=0.9699, which is much larger than 0.05, the null hypothesis cannot be rejected, which means the variances are equal. We can use a 2-sample t test for the analysis.
b.
t.test(type_1, type_2, paired = FALSE, var.equal = TRUE, alternative = "two.sided")
##
## Two Sample t-test
##
## data: type_1 and type_2
## 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
p-value=0.9622 which is larger than 0.05. The null hypothesis cannot be rejected. The mean burning times are not equal.
PT_95 <- c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
PT_100 <- c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)
qqnorm(PT_95)
qqnorm(PT_100)
boxplot(PT_95, PT_100)
#levene's test
data2 <- c(PT_95, PT_100)
group2 <- factor(rep(1:2, c(length(PT_95), length(PT_100))))
levene.test(data2, group2, 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: data2
## Test Statistic = 2.5625, p-value = 0.1317
#t test
t.test(PT_95, PT_100, alternative = "greater", var.equal = TRUE)
##
## Two Sample t-test
##
## data: PT_95 and PT_100
## 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
P-value is approximately 0.0091, which is less than the significance level of 0.05, there is enough evidence to support the claim that the higher baking temperature results in wafers with a lower mean photoresist thickness compared to the lower baking temperature.
b.
P-value is approximately 0.0091.
c.
t.test(PT_95, PT_100, alternative = "two.sided", var.equal = TRUE)
##
## Two Sample t-test
##
## data: PT_95 and PT_100
## 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
The 95% confidence interval for the difference in means between the two baking temperatures is approximately (0.4995743, 4.5404257). Practical Interpretation: With 95% confidence, the true difference in mean photoresist thickness between the two temperatures lies between 0.4995743 and 4.5404257 kA. The interval lies in the positive side and indicates that the average photoresist thickness is greater at 95°C compared to 100°C.
e.
qqnorm(PT_95, main = "QQ Plot for PT_95")
qqline(PT_95)
qqnorm(PT_100, main = "QQ Plot for PT_100")
qqline(PT_100)
shapiro.test(PT_95)
##
## Shapiro-Wilk normality test
##
## data: PT_95
## W = 0.87501, p-value = 0.1686
shapiro.test(PT_100)
##
## Shapiro-Wilk normality test
##
## data: PT_100
## W = 0.9348, p-value = 0.5607
Both p values are greater than 0.05. Photoresist thickness can be seen as normally distributed. f.
library(pwr)
library(effsize)
PT_95 <- c(11.176, 7.089, 8.097, 11.739, 11.291, 10.759, 6.467, 8.315)
PT_100 <- c(5.263, 6.748, 7.461, 7.015, 8.133, 7.418, 3.772, 8.963)
n <- length(PT_95)
effect_size <- cohen.d(PT_95, PT_100)
effect_size_result <- effect_size$estimate
class(effect_size_result)
## [1] "numeric"
pwr.t.test(n = n, d = effect_size_result, sig.level = 0.05, type = "two.sample", alternative = "two.sided")
##
## Two-sample t test power calculation
##
## n = 8
## d = 1.337555
## sig.level = 0.05
## power = 0.701445
## alternative = two.sided
##
## NOTE: n is number in *each* group
The power is approximately 0.701.
a.
caliper_1 <- c(0.265, 0.265, 0.266, 0.267, 0.267, 0.265, 0.267, 0.267, 0.265, 0.268, 0.268, 0.265)
caliper_2 <- c(0.264, 0.265, 0.264, 0.266, 0.267, 0.268, 0.264, 0.265, 0.265, 0.267, 0.268, 0.269)
t.test(caliper_1, caliper_2, alternative = "two.sided", paired = TRUE)
##
## Paired t-test
##
## data: caliper_1 and caliper_2
## t = 0.43179, df = 11, p-value = 0.6742
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.001024344 0.001524344
## sample estimates:
## mean difference
## 0.00025
p-value is larger than 0.05, so there is no significant difference between the means of population of measurements from the which the two samples were selected.
b.
p-value = 0.6742.
c.
The 95% confidence interval is approximately (-0.001024344, 0.001524344).
2.34
a.
KM <- c(1.186, 1.151, 1.322, 1.339, 1.200, 1.402, 1.365, 1.537, 1.559)
LM <- c(1.061, 0.992, 1.063, 1.062, 1.065, 1.178, 1.037, 1.086, 1.052)
t.test(KM, LM, paired=TRUE, alternative="two.sided")
##
## Paired t-test
##
## data: KM and LM
## t = 6.0819, df = 8, p-value = 0.0002953
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.1700423 0.3777355
## sample estimates:
## mean difference
## 0.2738889
P-value is much smaller than 0.05, so we can reject the null hypothesis. We can conclude that there is enough evidence to support that there is a difference in mean performance between the two methods.
b.
P-value = 0.0002953.
c.
95 percent confidence interval for the difference in mean predicted to observed load: (0.1700423, 0.3777355)
qqnorm(KM)
qqline(KM)
qqnorm(LM)
qqline(LM)
shapiro.test(KM)
##
## Shapiro-Wilk normality test
##
## data: KM
## W = 0.92905, p-value = 0.4724
shapiro.test(LM)
##
## Shapiro-Wilk normality test
##
## data: LM
## W = 0.84182, p-value = 0.06051
The p-values are both greater than 0.05, so both samples can be see as normal distributed.
e.
difference <- KM - LM
qqnorm(difference)
qqline(difference)
shapiro.test(difference)
##
## Shapiro-Wilk normality test
##
## data: difference
## W = 0.91678, p-value = 0.3663
p-value is greater than 0.05, so the differences in ratios can also be seen as normally distributed.
f.
Paired t test requires the differences are normally distributed, but doesn’t require each sample is normally distributed. If the difference is not ND, the we need to use non-parametric analysis, such as wilcox test.
e, f are answered above.
a.
fr_125 <- c(2.7, 4.6, 2.6, 3.0, 3.2, 3.8)
fr_200 <- c(4.6, 3.4, 2.9, 3.5, 4.1, 5.1)
difference_fr <- fr_125 - fr_200
shapiro.test(difference_fr)
##
## Shapiro-Wilk normality test
##
## data: difference_fr
## W = 0.95082, p-value = 0.7469
wilcox.test(fr_125, fr_200, paired = TRUE)
##
## Wilcoxon signed rank exact test
##
## data: fr_125 and fr_200
## V = 4, p-value = 0.2188
## alternative hypothesis: true location shift is not equal to 0
p value is larger than 0.05, so we cannot reject null hypothesis. It’s not statistically significant to state that the flow rate affect average etch uniformity.