Chapter 17 Estimation and Hypothesis Tests: Two Populations
Two Independent Populations 2222 11 1212 22 n1n1 n2n2
Difference in Means: Variance Known
Testing Hypothesis on the Difference in Means: Variance Known Alt. HypothesisP-valueRejection Criterion H 1 : 0 P(z>z 0 )+P(z<-z 0 )z 0 > z 1- /2 or z 0 < z /2 H 1 : > 0 P(z>z 0 )z 0 > z 1- H 1 : < 0 P(z<-z 0 )z 0 < z Null Hypothesis: H 0 : 1 - 2 = 0 Test statistic:
Type II Error and Sample Size
Type II Error (OC Curve) Two-sided, =.05 Montgomery, D.C., Runger G.C., “Applied Statistics and Probability for Engineers”, 5 th Ed., 2010, John Wiley
Claim: Drying times of 2 different paints are same n 1 =n 2 =10, 1 = 2 =8, =.05 Null Hypothesis: H 0 : 1 - 2 = 0 Alt. Hypothesis: H 1 : 1 > 2 Test statistic: Rejection region: z.95 = P-value = P(z>2.52)=.0059 Reject H C Non-rejection Region Rejection Region Testing Hypothesis on the Difference of Means with Variance Known – Example
Confidence Interval for Difference in Means: Variance Known Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Choice of Sample Size If n 1 = n 2 = n
Tensile Strength n 1 =10 n 2 =12, 1 =1 2 =1.5, =.10 Confidence Interval on the Difference of Means with Variance Known – Example
Two Independent Populations Variance Unknown 11 22 n1n1 n2n2 Case 1: 1 2 = 2 2 = 2
Difference in Means: Variance Unknown (but equal) Pooled Estimator of 2 Student – t
Testing Hypothesis on the Difference in Means: Variance Unknown (but equal) Null Hypothesis: H 0 : 1 - 2 = 0 Test statistic: Alt. HypothesisP-valueRejection Criterion H 1 : 0 2*P(t>|t 0 |) t 0 > t /2,n1+n2-2 or t 0 < -t /2, n1+n2-2 H 1 : > 0 P(t>t 0 )t 0 > t , n1+n2-2 H 1 : < 0 P(t<-t 0 )t 0 <- t , n1+n2-2
B 12 in Energy drink n 1 =14, n 2 =16, s 1 =4.7, s 2 =3.9, =.01 Null Hypothesis: H 0 : 1 - 2 = 0 Alt. Hypothesis: H 1 : 1 ≠ 2 Test statistic: Rejection region: ±t.005,28 = ±2.763 P-value = 2P(t>|3.822|)= Reject H 0 Errors in book! Testing Hypothesis on the Difference of Means with Variance Unknown (but equal) – Ex. 17.5
Claim: Yield from a catalyst n 1 =n 2 =8, 1 = 2, =.05 Null Hypothesis: H 0 : 1 - 2 = 0 Alt. Hypothesis: H 1 : 1 ≠ 2 Test statistic: Rejection region: ±t.025,14 = ±2.145 P-value = 2P(t>|-0.35|)=.7315 Fail to reject H 0 Testing Hypothesis on the Difference of Means with Variance Unknown (but equal) – Example Cat. 1Cat avg s
Confidence Interval for Difference in Means: Variance Unknown (but equal) Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Caffeine content n 1 =15 n 2 =12, s 1 =5.3 s 2 =6.7, =.05 Confidence Interval on the Difference of Means with Variance Unknown (but equal) – Ex. 17.3
Two Independent Populations Variance Unknown 11 22 n1n1 n2n2 Case 2: 1 2 ≠ 2 2
Difference in Means: Variance Unknown Student – t
Testing Hypothesis on the Difference in Means: Variance Unknown Null Hypothesis: H 0 : 1 - 2 = 0 Test statistic: Alt. HypothesisP-valueRejection Criterion H 1 : 0 2*P(t>|t 0 |) t 0 > t /2, or t 0 < -t /2, H 1 : > 0 P(t>t 0 )t 0 > t , H 1 : < 0 P(t<-t 0 )t 0 <- t ,
Promotional campaign effect n 1 =28, n 2 =24, s 1 =29, s 2 =13, =.05 Null Hypothesis: H 0 : 1 - 2 = 0 Alt. Hypothesis: H 1 : 1 > 2 Test statistic: Rejection region: t.05,38 = P-value = P(t>5.5837)= 1.06E-6 Reject H 0 Testing Hypothesis on the Difference of Means with Variance Unknown – Example 17.6 Errors in book!
Confidence Interval for Difference in Means: Variance Unknown Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Construction workers’ wage vs. Manuf. workers’ wage n 1 =500 n 2 =700, s 1 =3.26 s 2 =1.42, =.10 Confidence Interval on the Difference of Means with Variance Unknown – Ex. 17.4
Testing Hypothesis on the Difference of Medians – Mann Whitney Test Null Hypothesis: H 0 : 1 = 2 Test statistic: H 1 : 1 < 2 Critical value U c (from Table VI, with n 1, n 2, ) Reject H 0 if U<U c H 1 : 1 > 2 Find U’ (from Table VI, with n 1, n 2, ), U c = n 1 n 2 - U’ Reject H 0 if U>U c H 1 : 1 ≠ 2 Find U lower (from Table VI, with n 1, n 2, /2), U upper = n 1 n 2 - U lower Reject H 0 if U U upper Where S 1 is the sum of ranks of sample 1
Testing Hypothesis on the Difference of Medians – Example 17.9 =.05 Null Hypothesis: H 0 : 1 = 2 Test statistic: H 1 : 1 ≠ 2 U lower = 4 (Table VI, with n 1 =5, n 2 =6,.025), U upper = n 1 n 2 – U lower = (5)(6)-4 = 26 Reject H 0 if U U upper Fail to reject H 0
Alt. HypothesisP-valueCritical Regions H 1 : 1 2 2P(z |z 0 |) z 0 z 1- /2 H 1 : 1 < 2 P(z z 0 ) z 0 <z H 1 : 1 > 2 P(z z 0 ) z 0 >z 1- Null Hypothesis: H 0 : = 0 Test statistic: Testing Hypothesis on the Difference of Medians – Large Sample Size
Paired t-Test 11 22 n n Before After Paired
Paired t-Test dd d = Mean of the paired difference for the population d = Std dev. of the paired difference for the population s d = Sample std dev of the paired difference n = number of pairs Student – t
Testing Hypothesis on the Mean of the Paired Differences Null Hypothesis: H 0 : d = 0 Test statistic: Alt. HypothesisP-valueRejection Criterion H 1 : 0 2*P(t>|t 0 |) t 0 > t /2,n-1 or t 0 < -t /2, n-1 H 1 : > 0 P(t>t 0 )t 0 > t , n-1 H 1 : < 0 P(t<-t 0 )t 0 <- t , n-1
Before and after a course =.01 Null Hypothesis: H 0 : d = 0 Alt. Hypothesis: H 1 : d > 0 Test statistic: Rejection region: t.01,5 = P-value = P(t>3.869)= Reject H 0 Testing Hypothesis on the Mean of the Paired Differences – Ex BeforeAfterd Mean4.167 Std. Deviation2.639
Assembly Time =.05 Null Hypothesis: H 0 : d = 0 Alt. Hypothesis: H 1 : d 0 Test statistic: Rejection region: t.025,6 = P-value = 2P(t>2.7914)= Reject H 0 Testing Hypothesis on the Mean of the Paired Differences – Ex OldNewd Mean Std. Dev
Confidence Interval on the Mean of the Paired Differences Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Parallel Parking =.10 Confidence Interval on the Mean of the Paired Differences – Example Auto 1Auto 2d Mean1.21 Std. Dev.12.68
Testing Hypothesis on the Median of the Paired Differences – Wilcoxon Signed Rank Test Assuming symmetric continuous distribution Null Hypothesis: H 0 : d = 0 Test statistic: Rank the absolute values of d from smallest to largest (discard pairs with d=0) For each d, assign a plus (+) or minus (-) sign Calculate W + (sum of ranks with +) and W - (sum of ranks with -) For H 1 : d ≠ 0, test statistics W = min (W +, W - ) For H 1 : d > 0, test statistics W = W - For H 1 : d < 0, test statistics W = W + Decision: Reject H 0 if W Wc (Critical Value in Table VII)
Testing Hypothesis on the Median of the Paired Differences – Example =.10 Null Hypothesis: H 0 : d = 0 H 1 : d < 0 Test statistics W = W + = 4 Critical value: W c = 10 Reject H 0 Curr.NewdRank
Alt. HypothesisP-valueCritical Regions H 1 : d 02P(z |z 0 |) z 0 z 1- /2 H 1 : d < 0P(z z 0 ) z 0 <z H 1 : d > 0P(z z 0 ) z 0 >z 1- Null Hypothesis: H 0 : d = 0 Test statistic: Testing Hypothesis on the Median of the Paired Differences – Large Sample Size
Let x 11, x 12,.. x 1n be a random sample from a normal distribution with 1 and 1 2, and x 21, x 22,.. x 2n be a random sample from a normal distribution with 2 and 2 2, and let s 1 2 and s 2 2 be the sample variances. Assume both normal population are independent, then the ratio has F distribution with n 1 -1 numerator degrees of freedom and n 2 -1 denominator degrees of freedom. Testing Hypothesis on the Ratio of Two Variances
F Distribution Let W, and Y be independent 2 random variables with u and degrees of freedom, the ratio F = (W/u)/(Y/ ) has F distribution. Probability Density Function, with u, degrees of freedom, Mean Variance
F Distribution Table V in Appendix A.
Testing Hypothesis on the Ratio of Two Variances Alt. Hypothesis P-valueRejection Criterion H 1 : 1 2 2 2 P(f >f 0 ) + P(f <1/f 0 ) f 0 > f /2,n1-1, n2-1 or f 0 < f 1- /2,n1-1, n2-1 H 1 : 1 2 > 2 2 P(f >f 0 )f 0 > f ,n1-1, n2-1 H 1 : 1 2 < 2 2 P(f <1/f 0 )f 0 < f 1- ,n1-1, n2-1 Null Hypothesis: H 0 : 1 2 = 2 2 Test statistic:
Semiconductor Etch Variability s 1 =1.96, s 2 =2.13, n=16, =.05 Null Hypothesis: H 0 : 1 2 = 2 2 Alt. Hypothesis: H 1 : 1 2 2 2 Test statistic: Rejection region: F.025,15,15 = F.975,15,15 = p-value = P(F >0.85)= Fail to reject H C Non-rejection Region Rejection Region Testing Hypothesis on the Ratio of Two Variances – Example Rejection Region
Confidence Interval on the Ratio of Two Variances Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Surface finish for Titanium Alloy s 1 =5.1, n 1 =11, s 2 =4.7, n 2 =16, =.10 Confidence Interval on the Ratio of Two Variances – Example
Inferences about Differences between Two Population Proportions Population x USL LSL p Population 22 x USL LSL p n 1, x 1 n 2, x 2 11
Testing Hypothesis on the Difference in Two Population Proportions Alt. HypothesisP-valueRejection Criterion H 1 : p p 0 2P(z>|z 0| )z 0 > z 1- /2 or z 0 < z /2 H 1 : p > p 0 P(z>z 0 )z 0 > z 1- H 1 : p < p 0 P(z<-z 0 )z 0 < z Null Hypothesis: H 0 : p 1 = p 2 Test statistic:
Brands of toothpaste n 1 =500, n 2 =400, =.01 Null Hypothesis: H 0 : p 1 = p 2 Alt. Hypothesis: H 1 : p 1 > p 2 Test statistic: Rejection region: z 1- = z.99 =2.326 P-value = P(z>2.7852)= Reject H 0 Testing Hypothesis on the Difference in Two Population Proportions – Example 17.15
Types of machine x 1 =48, n 1 =800, x 1 =45, n 2 =900, =.01 Null Hypothesis: H 0 : p 1 = p 2 Alt. Hypothesis: H 1 : p 1 p 2 Test statistic: Rejection region: z /2 = z.005 = or z 1- /2 = z.995 =2.576 P-value = P(z>.9050)=.3655 Fail to reject H 0 Testing Hypothesis on the Difference in Two Population Proportions – Example 17.16
Confidence Interval on the Difference in Two Population Proportions Confidence Interval One-sided Upper Confidence Bound One-sided Lower Confidence Bound
Confidence Interval on the Difference in Two Population Proportions – Ex Brands of toothpaste n 1 =500, n 2 =400, =.05 Confidence Interval