200 likes | 359 Views
Two Population Means Hypothesis Testing and Confidence Intervals With Known Standard Deviations. SITUATION: 2 Populations. Population 1 Mean = 1 St’d Dev. = 1. Population 2 Mean = 2 St’d Dev. = 2. Salaries in Chicago. Women’s Test Scores. Lakers Attendance. Anaheim Sales.
E N D
Two Population Means Hypothesis Testing and Confidence Intervals With Known Standard Deviations
SITUATION: 2 Populations Population 1 Mean = 1St’d Dev. = 1 Population 2 Mean = 2St’d Dev. = 2 Salaries in Chicago Women’s Test Scores Lakers Attendance Anaheim Sales Salaries in St. Louis Men’s Test Scores Clippers Attendance Mission Viejo Sales
KEY ASSUMPTIONS Sampling is done from two populations. • Population 1 has mean µ1 and variance σ12. • Population 2 has mean µ2 and variance σ22. • A sample of size n1 will be taken from population 1. • A sample of size n2 will be taken from population 2. • Sampling is random and both samples are drawn independently. • Either the sample sizes will be large or the populations are assumed to be normally distribution.
The Problem • 1 and 2 are unknown • 1 and 2 may or may not be known (In this module we assume they are known.) OBJECTIVES • Test whether 1 > 2 (by a certain amount) • or whether 1 2 • Determine a confidence interval for the difference in the means: 1 - 2
Key Concepts About the Random Variable . • is the difference in two sample means. • Its mean is the difference of the two individual means: • If the variables are independent (which we assumed), the variance (not the standard deviation) of the random variable of the differences = the sum (not the difference) of the two variances: • Thus its standard deviation is: • Its distribution is: • Normal if σ1 and σ2 are known • t if σ1 and σ2 are unknown
Hypothesis Test Statistics forDifference in Means, Known σ’s • We will be performing hypothesis tests with null hypotheses, H0, of the form: • From the general form of a test statistic, the required test statistic will be: H0: µ1 - µ2 = v
Confidence Intervals for µ1 - µ2Known σ’s • Recall the general form of a confidence interval is: Thus when the σ’s are known this becomes: (Point Estimate) ± zα/2(Appropriate Standard Error)
EXAMPLEHypothesis Test: 1, 2 Known Test whether starting salaries for secretaries in Chicago are at least $5 more per week than those in St. Louis. GIVEN: Salaries assumed to be normal Standard Deviations known: Chicago $10; St. Louis $15 Sample Results Sampled 100 secretaries in Chicago; 75 secretaries in St. Louis Sample averages: Chicago - $550, St. Louis -$540
Hypothesis Test H0: 1 - 2 = 5 HA: 1 - 2 > 5 Use = .05 Reject H0 (Accept HA) if z > z.05 = 1.645
Calculating z Remember
Conclusion • Since 2.5 > 1.645 • It can be concluded that the average starting salary for secretaries in Chicago is at least $5 per week greater than the average starting salary in St. Louis. • The p-value: • The area above z= 2.5 on the normal curve = 1 - .9938 = .0062 • Since .0062 is low (compared to α), it can be concluded that the average starting salary for secretaries in Chicago is at least $5 per week greater than the average starting salary in St. Louis.
EXAMPLEConfidence Interval: 1, 2 Known • Construct a 95% confidence for the difference in average between weekly starting salaries for secretaries in Chicago and St. Louis. $10 ± $3.92 $6.08 ↔ $13.92
Excel Approach • Suppose, as shown on the next slide the data for Chicago is given in column A (A2:A101) and the data for St. Louis is given in column B (B2:B76). • The analysis can be done using an entry from the Data Analysis Menu: z-test: Two Sample for Means
Go to Tools Data Analysis Go to Tools Data Analysis Select z-Test: Two Sample For Means
For 1-tail tests, input columns so that the test is a “>” test. Enter Hypothesized Difference Enter Variances Not Standard Deviations Enter Beginning Cell For Output Check Labels
p-value for “>” test p-value for “” test
=(E4-F4)-NORMSINV(0.975)*SQRT(E5/E6+F5/F6) Highlight formula in cell E15—press F4. Drag to cell E16 and change “-” to “+”.
Estimating Sample Sizes • Usual Assumptions: • Same sample size from each pop.: n1 = n2 = n • Standard deviations, s1, s2known • Calculate n from the “±” part of the confidence interval for known 1and 2
Example • How many workers would have to be surveyed in Chicago and St. Louis to estimate the true average difference in starting weekly salary to within $3?
Review • Mean and standard deviation for X1 -X2 • Assumptions for tests and confidence intervals • z-tests for differences in means when 1 and 2 are known: • By hand • By Excel • Confidence intervals for differences in means when 1 and 2 are known: • By hand • By Excel • Estimating Sample Sizes