StMath 390, Homework set # 6 Due February 21, 2017 Problem 1 (Page 306, number 46. This problem has an additional question). The article “Concrete Pressure on Formwork” (Mag. of Concrete Res., 2009: 407-417) gave the following observations on maximum concrete pressure (kN/m2): 33.2, 41.8, 37.3, 40.2, 36.7, 39.1, 36.2, 41.8, 36.0, 35.2, 36.7, 38.9, 35.8, 35.2, 40.1 (a) Is it plausible that this sample was selected from a normal population distribution? (b) Calculate an upper confidence bound with confidence level 95% for the population mean of maximum pressure. (c) Calculate the two limits of a confidence interval with confidence level 80% for the population mean of maximum pressure. Solution to Problem 1. (a) To decide if this is a random sample from normal population distribution I generate the probability plot and perform the Shapiro-Wilk’s test. The qq-plot shown in Figure 1 shows that the data follows closely the straight line, supporting the assumption that the sample is normal. The results of the Shapiro-Wilk’s test further support that fact since its p-value is large. Figure 1: 42 Normal Q−Q Plot ● 40 ● ● ● 38 ● ● ● 36 ● ● ● ● ● 34 Sample Quantiles ● ● −1 0 Theoretical Quantiles 1 1 ● > x=c(33.2, 41.8, 37.3, 40.2, 36.7, 39.1, 36.2, 41.8, 36, 35.2, 36.7, 38.9, 35.8, 35.2, 40.1) > qqnorm(x) > qqline(x) > shapiro.test(x) Shapiro-Wilk normality test data: x W = 0.9442, p-value = 0.4387 (b) The limit of a 100(1 − α)% upper confidence bound for the population mean is computed as s x̄ + t1−α,n−1 √ n So the limit of a 95% upper confidence bound for the population mean is approximately 2.57 37.61 + 1.76 √ ≈ 38.78 15 We can report this result in one of the following two equivalent ways: • Based on the observed data we are 95% confident that µ ≤ 38.78. • Based on the observed data 38.78 is the 95% upper confidence upper limit for µ. (c) The two limits of a 100(1 − α)% confidence interval for the population mean are computed as s x̄ ± t1− α2 ,n−1 √ n So the two limits of an 80% confidence interval for the population mean are approximately 2.57 37.61 ± 1.35 √ ≈ 36.72 15 and 38.51 We can report this result as follows: based on the observed data we are 95% confident that 36.72 ≤ µ ≤ 38.78. > n=length(x) > x.bar=mean(x); x.bar [1] 37.61333 2 > s=sd(x); s [1] 2.571511 # For part (b) > alpha=.05 > qt(1-alpha,n-1) [1] 1.76131 > x.bar+qt(1-alpha,n-1)*s/sqrt(n) [1] 38.78277 # For part (c) > alpha=.20 > qt(1-alpha/2,n-1) [1] 1.34503 > x.bar+c(-1,1)*qt(1-alpha/2,n-1)*s/sqrt(n) [1] 36.72029 38.50638 Problem 2 (Page 308, number 54). It is important that face masks used by firefighters be able to withstand high temperatures because firefighters commonly work in temperatures of 200 − 500◦ F. In a test of one type of mask, 11 of 55 masks had lenses pop out at 250◦ . Construct a 90% upper confidence bound for the true proportion of masks of this type whose lenses would pop out at 250◦ . Solution to Problem 2. The limit of an 100(1 − α)% upper confidence bound for p is r p̂(1 − p̂) p̂ + z1−α n where p̂ = nx . 11 In our case α = 1 − .90 = .10 and p̂ = 55 = .20, so the limit of an 90% upper confidence bound for p is approximately r .20(1 − .20) .20 + 1.28 ≈ .27 55 So we are 90% confident that p < .27 In other words we are 90% confident that 27% or fewer of the masks would pop out at 250◦ . > x=11 > n=55 > p.hat=x/n; p.hat 3 [1] 0.2 > alpha=1-.90 > qnorm(1-alpha) [1] 1.281552 > p.hat+qnorm(1-alpha)*sqrt(p.hat*(1-p.hat)/n) [1] 0.2691218 Problem 3 (Variation on problem 59 on Page 308). Let X1 , . . . , Xn be a random sample from a uniform distribution on the interval [0, θ], so that 1/θ 0 ≤ x ≤ θ f (x) = 0 otherwise Then if Y = max(Xi ), it can be shown that the random variable U = Y /θ has density nun−1 0 ≤ x ≤ 1 fU (u) = 0 otherwise (a) Use fU (u) to verify that Y P (α/2)1/n < ≤ (1 − α/2)1/n = 1 − α θ and use this to derive a 100(1 − α)% CI for θ. (b) If my waiting time for a morning bus is uniformly distributed on the interval [0, θ] and the observed waiting times are x1 = 4.2, x2 = 3.5, x3 = 1.7, x4 = 1.2, and x5 = 2.4, derive a 95% CI for θ using the result in part (a). Solution to Problem 3. From the pdf of the random variable U we can compute its cdf and get x<0 0 un 0 ≤ x ≤ 1 FU (u) = 1 otherwise (a) Using FU (u) we have that Y 1/n 1/n P (α/2) < ≤ (1 − α/2) = θ = P (α/2)1/n < U ≤ (1 − α/2)1/n = FU (1 − α/2)1/n − FU (α/2)1/n h in h in = (1 − α/2)1/n − (α/2)1/n = (1 − α/2) − (α/2) = 1 − α 4 Therefore a 100(1 − α)% CI for θ is given by Y Y ≤θ≤ (1 − α/2)1/n (α/2)1/n (b) For the given waiting times the observed value of the random variable Y is y = max(x1 , . . . , x5 ) = 4.2. Then the corresponding lower and upper limits of the 95% CI for θ are approximately 4.2 y = ≈ 4.22 1/n (1 − α/2) (1 − .05/2)1/n y 4.2 = ≈ 8.78 (α/2)1/n (.05/2)1/n > x=c(4.2, 3.5,1.7,1.2,2.4) > y=max(x); y [1] 4.2 > n=length(x); n [1] 5 > alpha=1-.95; alpha [1] 0.05 > # Lower limit > y/(1-alpha/2)^(1/n) [1] 4.221321 > # Upper limit > y/(alpha/2)^(1/n) [1] 8.783372 Problem 4 (Page 333, number 18). Reconsider the paint-drying situation of Example 8.5, in which drying time for a test specimen is normally distributed with σ = 9. The hypotheses H0 : µ = 75 versus Ha : µ < 75 are to be tested using a random sample of n = 25 observations. (a) How many standard deviations (of X̄) below the null value is x̄ = 72.3? (b) If x̄ = 72.3, what is the conclusion using α = .002? (c) For the test procedure with α = .002, what is β(70)? (d) If the test procedure with α = .002 is used, what n is necessary to ensure that β(70) = .01? (e) If a level .01 test is used with n = 100, what is the probability of a type I error when µ = 76? 5 Solution to Problem 4. (a) The number of standard deviations (of X̄) that x̄ = 72.3 is below the null value is determined by computing the corresponding z-score: z-score = x̄ − µ0 72.3 − 75 √ = = −1.5 9/5 σ/ n Hence x̄ = 72.3 is one and one half standard deviations below the mean. (b) We can go three equivalent ways to come to a conclusion. 1. We compute the p-value and compare it with α = .002. p-value = P (X̄ ≤ x̄ | H0 ) = P (X̄ ≤ 72.3 | µ0 = 75) 72.3 − 75 = Φ(−1.5) ≈ 0.067 =Φ 9/5 Since p-value ≈ .067 > .002 = α we fail to reject the null hypothesis. In practical terms there is no significant evidence that the drying time is less than 75 minutes. 2. We compute the z-score z-score = x̄ − µ0 72.3 − 75 √ = = −1.5 9/5 σ/ n and compare it with −z.998 ≈ −2.88. Since −1.5 is larger that −z.998 we arrive at the same conclusion as before. 3. We compare x̄ = 72.3 with 9 σ µ0 − z.998 √ ≈ 75 − 2.88 ≈ 69.82 5 n and since x̄ is the largest of the two, the conclusion is the same as before. (c) In general for the alternative Ha : µ < µ0 , σ µ0 − µ0 0 0 √ β(µ ) = P X̄ > µ0 − z1−α √ | µ = 1 − Φ −z1−α + n σ/ n So for the test procedure with α = .002 75 − 70 ≈ 1 − φ(−.10) ≈ .54 β(70) = 1 − Φ −z.998 + 9/5 (d) For α = .002, and a general sample size n we have that 75 − 70 √ β(70) = 1 − Φ −z.998 + . 9/ n 6 We want n so that β(70) = .01 which is equivalent to finding n so that 75 − 70 √ Φ −z.998 + = .99 9/ n and furthermore it is equivalent to finding n so that −z.998 + 75 − 70 √ = z.99 . 9/ n Solving for n we then have 2 9(z.99 + z.998 ) n= ≈ 87.8 75 − 70 so we need n = 88. We can verify that this result is correct if we compute β(70) for n = 88. Since we get .0098 this verifies that n = 88 is correct. (e) If a level .01 test is used with n = 100, what is the probability of a type I error when µ = 76? p-value = P (X̄ ≤ x̄ | µ = 76) = P (X̄ ≤ 72.3 | µ = 76) 72.3 − 76 ≈ Φ(−2.06) ≈ 0.02 =Φ 9/5 Since p-value is larger that .01 we fail to reject µ = 76. > > > > n=25 x.bar=72.3 mu.0=75 sig=9 For part (a) > z.score=(x.bar-mu.0)/(sig/sqrt(n)) > z.score [1] -1.5 For part (b) approach 1 > pnorm(-1.5) [1] 0.0668072 approach 2 > qnorm(.998) [1] 2.878162 7 approach 3 > mu.0-qnorm(.998)*sig/sqrt(n) [1] 69.81931 > mu.1=70 > -pnorm(.998)+(mu.0-mu.1)/(sig/sqrt(n)) [1] 1.936917 > -qnorm(.998)+(mu.0-mu.1)/(sig/sqrt(n)) [1] -0.100384 > 1-pnorm(-qnorm(.998)+(mu.0-mu.1)/(sig/sqrt(n))) [1] 0.5399802 > > sig*(qnorm(.99)+qnorm(.998))/(75-70) [1] 9.368117 > (sig*(qnorm(.99)+qnorm(.998))/(75-70))^2 [1] 87.76162 > 1-pnorm(-qnorm(.998)+(mu.0-mu.1)/(sig/sqrt(88))) [1] 0.009813284 For part (e) > z.score=(x.bar-76)/(sig/sqrt(n)); z.score [1] -2.055556 > pnorm(z.score) [1] 0.01991269 Problem 5 (Page 334, number 22). To obtain information on the corrosionresistance properties of a certain type of steel conduit, 45 specimens are buried in soil for a 2-year period. The maximum penetration (in mils) for each specimen is then measured, yielding a sample average penetration of x̄ = 52.7 and a sample standard deviation of s = 4.8. The conduits were manufactured with the specification that true average penetration be at most 50 mils. They will be used unless it can be demonstrated conclusively that the specification has not been met. What would you conclude? Solution to Problem 5. We have that n = 45, x̄ = 52.7 and s = 4.8. We are testing the null hypothesis H0 : µ = 50 versus teh alternative hypothesis 8 Ha : µ > 50. We compute the p-value p-value = P (X̄ ≥ x̄ | µ = 50) 52.7 − 50 √ =1−Φ ≈ 1 − Φ(3.77) ≈ 8 × 10−5 4/8/ 45 This shows that the observed sample mean is not consistent with the hypothesis that µ = 50, in other words the specification has not been met. > n=45 > x.bar=52.7 > s=4.8 > mu.0=50 > z.score=(x.bar-mu.0)/(s/sqrt(n)); z.score [1] 3.773365 > 1-pnorm(z.score) [1] 8.053029e-05 9
© Copyright 2025 Paperzz