STAT 531 Statistical Methods for Quality Improvement Homework 3 4.8 n = 8; x = 17 psi; σ = psi (a) µ = 15; α =.5 Test H : µ = 15 vs. H 1 : µ > 15. Reject H if Z > Z α. x µ 17 15 Z = = =.88 σ n 8 Z α = Z.5 = 1.645 Reject H : µ = 15, and conclude that the mean tensile strength exceeds 15 psi. (b) P-value = 1 Φ(Z ) = 1 Φ(.88) = 1.99766 =.34 (c) In strength tests, we usually are interested in whether some minimum requirement is met, not simply that the mean does not equal the hypothesized value. A one-sided hypothesis test lets us do this. (d) x Zα σ n µ 17 1.645 8 µ 15.8 µ 4.1. (a) x ~ N(µ, σ), µ = 1, α =.1 n = 1, x = 1.15, s =.3 Test H : µ = 1 vs. H 1 : µ > 1. Reject H if t > t α. x µ 1.15 1 t = = = 1.5655 S n.33 1 t α, n 1 = t.1, 9 =.81 Do not reject H : µ = 1, and conclude that there is not enough evidence that the mean fill volume exceeds 1 oz. (b) α =.5 t α/, n 1 = t.5, 9 =.6 µ α n ( S ) µ ( S ) x t S n x + t S n α /, n 1 /, 1 1.15.6 1 1.15+.6 1 11.993 µ 1.37 (c) We can check this with a normal probability plot fillvol area score 11.96.5-1.64 11.98.15-1.4 11.99.5 -.67 1.1.35 -.39 1..45 -.13 1..55.13 1.3.65.39 1.4.75.67 fillvol Normal probability plot of fill volume 1.6 1.4 1. 1. 11.98 11.96-1.8-1.1 -.4.3 1. 1.7 score 1
1.5.85 1.4 1.5.95 1.64 The plotted points fall approximately along a straight line, so the assumption that fill volume is normally distributed is appropriate. For the confidence interval, the standard deviation is.3 oz, and the sample size is n=1, giving (n-1)s =.81. There are 9 degrees of freedom, and the upper and lower ½ % points of this chisquared are.7 and 19. respectively. So a 95% confidence interval is given by.81.81 ;.46 < σ < < σ <.3. The 95% CI for σ is.1 < σ <.55 19..7 4.15 x ~ N(µ, σ), n = 16, x = 1.59 V, s =.999 V (a) µ = 1, α =.5 Test H : µ = 1 vs. H 1 : µ 1. Reject H if t > t α/. x µ 1.59 1 t = = = 6.971 S n.999 16 t α/, n 1 = t.5, 15 =.131 Reject H : µ = 1, and conclude that the mean output voltage differs from 1V. (b) /, n 1 µ α /, n 1 µ x t S n x + t S n α 1.59.131.999 16 1.59+.131.999 16 9.77 µ 1.79 (c) σ = 1, α =.5 Test H : σ = 1 vs. H 1 : σ 1. Reject H if χ > χ α/, n-1 or χ < χ 1-α/, n-1. ( n 1) S (16 1).999 χ = = = 14.97 σ 1 χ α/, n 1 = χ.5,16 1 = 7.488 χ 1 α/, n 1 = χ.975,16 1 = 6.6 Do not reject H : σ = 1, and conclude that there is insufficient evidence that the variance differs from 1. (d) ( n 1) S ( n 1) S χ σ α /, n 1 χ1 α /, n 1 (16 1).999 (16 1).999 σ 7.488 6.6.545 σ.391.738 σ 1.546 Since the 95% confidence interval on σ contains the hypothesized value, σ = 1, the null hypothesis, H : σ = 1, cannot be rejected.
=.5; = = 7.69 (e) α χ1 α, n 1 χ.95,15 ( n 1) S σ χ 1 α, n 1 (16 1).999 σ 7.69 σ.6 σ 1.436 (f) The probability plot looks decently linear, so we are OK with the normality assumption. 4. n =, x = 18, ˆp = x/n = 18/ =.9 (a) p =.1, α =.5. Test H : p =.1 versus H 1 : p.1. Reject H if Z > Z α/. np = (.1) = Since (x = 18) < (np = ), use the normal approximation to the binomial for x < np. This gives Z ( x +.5) np (18 +.5) = = = np (1 p ) (1.1).3536. If we omit the continuity correction, we get x np 18 Z = = =.47 np (1 p ) (1.1) Z α/ = Z.5/ = Z.5 = 1.96 Either way, do not reject H, and conclude that the sample process fraction nonconforming does not differ from.1. P-value = [1 Φ Z ] = [1 Φ.3536 ] = [1.638] =.736 (b) α =.1, Z α/ = Z.1/ = Z.5 = 1.645 pˆ Z pˆ (1 pˆ ) n p ˆp + Z ˆp (1 ˆp ) n α / α /.9 1.645.9(1.9) p.9+ 1.645.9(1.9).57 p.13 4.1. n = 5, x = 65, ˆp = x/n = 65/5 =.13 (a) p =.8, α =.5. Test H : p =.8 versus H 1 : p.8. Reject H if Z > Z α/. np = 5(.8) = 4 Since (x = 65) > (np = 4), use the normal approximation to the binomial for x > np. 3
( x.5) np (65.5) 4 With the continuity correction this gives Z = = = 4.387, and np (1 p ) 4(1.8) x np 65 4 omitting the correction gives Z = = = 4.1 np (1 p ) 4(1.8) Z α/ = Z.5/ = Z.5 = 1.96 Either way, reject H, and conclude the sample process fraction nonconforming differs from.8. (b) P-value = [1 Φ Z ] = [1 Φ 4.387 ] = [1.99997] =.6 (c) α =.5, Z α = Z.5 = 1.645 p pˆ + Z pˆ (1 pˆ ) n α p.13+ 1.645.13(1.13) 5 p.155 4. (a) n 1 =, x 1 = 1, ˆp 1 = x 1 /n 1 = 1/ =.5 n = 3, x =, ˆp = x /n = /3 =.67 (b) Use α =.5. Test H : p 1 = p versus H 1 : p 1 p. Reject H if Z > Z α/ or Z < Z α/ x + x 1 + n + n + 3 1 pˆ = = =.6 1 Z pˆ pˆ.5.67 1 = = = pˆ (1 pˆ ) 1 n + 1 n.6(1.6) 1 + 1 3 1 Z α/ = Z.5/ = Z.5 = 1.96 Z α/ = 1.96.784 Do not reject H. Conclude there is no strong evidence to indicate a difference between the fraction nonconforming for the two processes. (c) ˆ ˆ pˆ (1 pˆ ) pˆ (1 pˆ ) 1 1 ( p p ) Z + ( p p ) 1 α / 1 n n 1 pˆ (1 pˆ ) pˆ (1 pˆ ) 1 1 ( pˆ pˆ ) + Z + 1 α / n n 1.5(1.5).67(1.67) (.5.67) 1.645 + ( p p ) 1 3.5(1.5).67(1.67) (.5.67) + 1.645 + 3 p p 1.5 ( ).18 4.5 Test H : µ d = versus H 1 : µ d. Reject H if t > t α/, n1 + n. 4
t α/, n1 + n = t.5, =.8188. d =.417; s d =.13 ( d ) t = d s n =.417.1311 1 = 1.1 ( t = 1.1) <.8188, so do not reject H. There is no strong evidence to indicate that the two calipers differ in their mean measurements. 4.8 The test is two-sided, so the cutoff value will be z.5 = 1.96. We want a probability of Type II error of.1 when the mean is actually. We can figure the needed sample size using the formula given in class ( zα / + zβ ) σ (1.96 + 1.8)3 n = = = 3.78. µ µ 15 4.3 (a) We wish to test H : λ = λ versus H 1 : λ λ. Select random sample of n observations x 1, x,, x n. Each x i ~ POI(λ). In other words, we need n=4 n x ~ POI( nλ ). i Using the normal approximation to the Poisson, if n is large, x = x/n = ~ N(λ, λ/n). Z = x λ λ n. Reject H : λ = λ if Z > Z α/ / (b) x ~ Poi(λ), n = 1, x = 11, x = x/n = 11/1 =.11 Test H : λ =.15 versus H 1 : λ.15, at α =.1. Reject H if Z > Z α/. Z α/ = Z.5 =.5758 Z = ( x λ) λ n = (.11.15).15 1 = 1.38 ( Z = 1.38) <.5758, so do not reject H. Lab portion 1. > x <- c(145, 15, 153, 148, 141, 15, 146, 154, 139, 148) > y <- c(15, 15, 147, 155, 14, 146, 158, 15, 151, 143) > t.test(x, y) Welch Two Sample t-test data: x and y t = -.778, df = 17.843, p-value =.459 alternative hypothesis: true difference in means is not equal to 95 percent confidence interval: -6.7943 3.1943 sample estimates: mean of x mean of y 147.6 149.4 The t test shows no evidence of a difference between the two groups i = 1. > n <- 16 > C <- sqrt(qchisq(.95, n-1) / (n-1)) 5
> C [1] 1.9886 So the needed C value is 1.9. Now we ll trace out the OC curve. I also draw a horizontal line at OC=. to help answer the followup question > sig <- seq(1,,.5) > OC <- pchisq((n-1)*(c/sig)^, n-1) > dev.new() > plot(oc~sig, main="oc curve for testing sigma", xlab="sigma", + ylab="oc", type="l") > abline(h=.) Rather than try reading the answer off the curve, I ll get R to tell me. > offset <- abs(oc -.) > sig[offset==min(offset)] [1] 1.55 The σ for which the OC is closest to. (ie the power is closes to 8%) is σ=1.55. As this is just a bit bigger than the 1.5 the question asks about, the needed sample size is going to be a bit above 16. Some searching by getting the right C and then evaluating the OC gives: > for (n in 16:) { + C <- sqrt(qchisq(.95, n-1) / (n-1)) + oc <- pchisq((n-1)*(c/1.5)^, n-1) + print(paste(n, oc)) + } [1] "16.55187981698" [1] "17.347835499885" [1] "18.1591476313886" [1] "19.19847491854759" [1] ".183648745149" So we needed n=19 3. The equation for the OC was given in class. Coding it up gives 6
mu <- seq(15, 18,.1) > sigma <- > n <- 8 > OC <- pnorm(1.645 - (mu-15)*sqrt(n)/sigma) > dev.new() > plot(mu, OC, main="oc curve for normal mean", xlab="mu", + ylab="oc", type="l") 4. I ve edited out some unnecessary lines > allin <- read.csv("http://stat.umn.edu/hawkins/531/table_4e11.csv") > > fitter <- with(allin, lm(satisfaction ~ Severity)) > summary(fitter) Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) 119.533 11.1673 1.73.9e-1 *** Severity -1.176.343-5.19 4.45e-5 *** Residual standard error: 14.95 on 3 degrees of freedom Multiple R-squared:.57, Adjusted R-squared:.5 F-statistic: 5.19 on 1 and 3 DF, p-value: 4.447e-5 The regression is highly significant. Each 1 unit increase in severity corresponds to 1.18 units less in patient satisfaction. The graph of the relationship looks fine; no evidence of the sort of violations that would get you worried. > dev.new() > with(allin, plot(severity, Satisfaction, main="table 4E.11")) > abline(fitter) 7
8