The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL STOR 155 Introductory Statistics Lecture 20 Comparing two means Section 7 2 a modified case only 11 19 09 Lecture 20 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 1 s d Sample 1 size n1 mean X 2 s d Sample 2 size n2 mean X Consider the difference s1 s2 1 X 2 D X Assume the two samples are independent and both n1 and n2 are large e g at least 40 11 19 09 Lecture 20 2 Useful probability facts The random variable D has approximately a normal distribution with mean 1 2 and standard deviation q SD D 21 n 1 22 n2 An estimate of SD D Note This is the only expression not like in Lecture 19 with two different formulas q SE D 11 19 09 s21 n1 s22 n2 Lecture 20 3 Confidence Interval for 1 2 Expression D m D m where the margin of error m z SED Confidence level C determines 11 19 09 Lecture 20 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 19 09 z D SED Lecture 20 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 19 09 Lecture 20 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 n1 45 Sample 2 n2 90 11 19 09 1 2 1 3 61 X 2 2 95 X Lecture 20 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 SED 1 96 0 0366 0 07 11 19 09 Lecture 20 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 19 09 Lecture 20 9
View Full Document