The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL STAT 155 Introductory Statistics Lecture 22 Comparing two means Section 7 2 a modified case only 11 30 06 Lecture 22 1 Comparing two population means Population 1 with mean 1 s d 1 Population 2 with mean 2 s d 2 Interested in the difference 1 2 Sample 1 size n1 mean Sample 2 size n2 mean Consider the difference 1 s d X 2 s d X s1 s2 2 1 X D X Assume the two samples are independent and both n1 and n2 are large e g at least 40 11 30 06 Lecture 22 2 Useful probability facts The random variable D has approximately a normal distribution with mean 1 2 and standard deviation SD D q 21 n 1 22 n 2 An estimate of SD D q SED s21 n1 s22 n2 11 30 06 Lecture 22 3 Confidence Interval for 1 2 Expression D m D m m z SED where the margin of error Confidence level C determines 11 30 06 Lecture 22 z 4 Hypothesis testing for 1 2 We want to test H0 1 2 versus some 1 sided or 2 sided alternative Recall the 4 steps Step 1 need to specify the alternative Ha Step 2 test statistic 11 30 06 z D SE D Lecture 22 5 Hypothesis testing continued Step 3 The P value will be equal to P Z z for 1 sided upper tail Ha 1 2 P Z z for 1 sided lower tail Ha 1 2 2 P Z z for 2 sided Ha 16 2 Step 4 Compare the P value with the significance level and draw your conclusion 11 30 06 Lecture 22 6 Sampling survey by USDA Compare average wheat prices per bushel in July and September using independent samples of wheat producers Population 1 September Population 2 July Sample 1 n 1 45 Sample 2 n 2 90 11 30 06 1 2 1 3 61 X 2 2 95 X Lecture 22 s1 0 19 s2 0 22 7 Wheat price increase continued Test H0 1 2 vs Ha 1 2 Test statistic p z 3 61 2 95 0 19 2 45 0 22 2 90 18 03 P value P Z 18 03 0 00 Reject H0 95 CI for 1 2 is 0 59 0 73 where p SED 0 19 2 45 0 22 2 90 0 0366 m z SE D 1 96 0 0366 0 07 11 30 06 Lecture 22 8 Take Home Message CI for the difference 1 2 Hypothesis testing for comparing 1 and 2 4 steps Assumption both n1 and n2 are large Several other cases in Section 7 2 not studied small samples normal populations using t distributions to calculate P values 11 30 06 Lecture 22 9
View Full Document
Unlocking...