300 likes | 383 Views
Economics 105: Statistics. Any questions ?. Two-Sample Tests. Two-Sample Tests. Population Means, Independent Samples. Population Proportions, Independent Samples. Population Means, Related Samples. Population Variances. Examples:. Population 1 vs. independent Population 2.
E N D
Economics 105: Statistics Any questions?
Two-Sample Tests Two-Sample Tests Population Means, Independent Samples Population Proportions, Independent Samples Population Means, Related Samples Population Variances Examples: Population 1 vs. independent Population 2 Same population before vs. after treatment Proportion 1 vs. independent Proportion 2 Variance 1 vs. Variance 2
Related Populations Tests Means of 2 Related Populations • Paired or matched samples • Repeated measures (before/after) • Use difference between paired values: • Eliminates variation among subjects • Assumptions: • Both populations are normally distributed • Or, if not Normal, use large samples Paired samples • Di = X1i - X2i
Mean Difference, σD Known The ith paired difference is Di , where Paired samples • Di = X1i - X2i The point estimate for the population mean paired difference is D : Suppose the population standard deviation of the difference scores, σD, is known n is the number of pairs in the paired sample
Mean Difference, σD Known (continued) The test statistic for the mean difference is a Z value: Paired samples Where μD = hypothesized mean difference σD = population standard dev. of differences n = the sample size (number of pairs)
Confidence Interval, σD Known The confidence interval for μD is Paired samples Where n = the sample size (number of pairs in the paired sample)
Mean Difference, σD Unknown If σD is unknown, we can estimate the unknown population standard deviation with a sample standard deviation: Paired samples The sample standard deviation is
Mean Difference, σD Unknown (continued) • Use a paired t test, the test statistic for D is now a t statistic, with (n-1) d.f.: Paired samples Where t has (n-1) d.f. and SD is:
Confidence Interval, σD Unknown The confidence interval for μD is Paired samples where
Paired t Test Example • Assume you send your salespeople to a “customer service” training workshop. Has the training made a difference in the number of complaints? You collect the following data: Di Number of Complaints:(2) - (1) SalespersonBefore (1)After (2)Difference,Di C.B. 6 4 - 2 T.F. 20 6 -14 M.H. 3 2 - 1 R.K. 0 0 0 M.O. 4 0 - 4 -21 D = n = -4.2
Paired t Test: Solution • Has the training made a difference in the number of complaints (at the 0.01 level)? Reject Reject H0: μD = 0 H1: μD 0 /2 /2 = .01 D = - 4.2 - 4.604 4.604 - 1.66 Critical Value = ± 4.604d.f. = n - 1 = 4 Decision:Do not reject H0 (t stat is not in the reject region) Test Statistic: Conclusion:There is not a significant change in the number of complaints.
Two-Sample Tests Two-Sample Tests Population Means, Independent Samples Population Proportions, Independent Samples Means, Related Samples Population Variances Examples: Population 1 vs. independent Population 2 Same population before vs. after treatment Proportion 1 vs. Proportion 2 Variance 1 vs. Variance 2
Two Population Proportions Goal: test a hypothesis or form a confidence interval for the difference between two population proportions, π1 – π2 Population proportions, Independent Samples Assumptions: n1 π1 5 , n1(1- π1) 5 n2 π2 5 , n2(1- π2) 5 The point estimate for the difference is
Two Population Proportions Since we begin by assuming the null hypothesis is true, we assume π1 = π2 and pool the two sample estimates Population proportions, Independent Samples The pooled estimate for the overall proportion is: where X1 and X2 are the numbers from samples 1 and 2 with the characteristic of interest
Two Population Proportions (continued) The test statistic for p1 – p2 is a Z statistic: Population proportions, Independent Samples where
Confidence Interval forTwo Population Proportions Population proportions, Independent Samples The confidence interval for π1 – π2 is:
Example: Two population Proportions Is there a significant difference between the proportion of men and the proportion of women who will vote Yes on Proposition A? • In a random sample, 36 of 72 men and 31 of 50 women indicated they would vote Yes • Test at the .05 level of significance
Example: Two population Proportions (continued) • The hypothesis test is: H0: π1 – π2= 0 (the two proportions are equal) H1: π1 – π2≠ 0 (there is a significant diff between proportions) • The sample proportions are: • Men: p1 = 36/72 = .50 • Women: p2 = 31/50 = .62 • The pooled estimate for the overall proportion is:
Example: Two population Proportions (continued) Reject H0 Reject H0 The test statistic for π1 – π2 is: .025 .025 -1.96 1.96 -1.31 Decision:Do not reject H0 Conclusion:There is not significant evidence of a difference in proportions who will vote yes between men and women. Critical Values = ±1.96 For = .05
Contingency Tables • Useful in situations involving multiple population proportions • Used to classify sample observations according to two or more characteristics • Also called a cross-classification table.
Contingency Table Example • Left-Handed vs. Gender Dominant Hand: Left vs. Right Gender: Male vs. Female • 2 categories for each variable, so called a 2 x 2 table • Suppose we examine a sample of size 300
Contingency Table Example (continued) Sample results organized in a contingency table: sample size = n = 300: 120 Females, 12 were left handed 180 Males, 24 were left handed
2 Test for the Difference Between Two Proportions H0: π1 = π2(Proportion of females who are left handed is equal to the proportion of males who are left handed) H1: π1≠π2(The two proportions are not the same – Hand preference is not independent of gender) • If H0 is true, then the proportion of left-handed females should be the same as the proportion of left-handed males • The two proportions above should be the same as the proportion of left-handed people overall
The Chi-Square Test Statistic The Chi-square test statistic is: • where: fo = observed frequency in a particular cell fe = expected frequency in a particular cell if H0 is true 2 for the 2 x 2 case has 1 degree of freedom (Assumed: each cell in the contingency table has expected frequency of at least 5)
Decision Rule The 2 test statistic approximately follows a chi-squared distribution with one degree of freedom Decision Rule: If 2 > 2U, reject H0, otherwise, do not reject H0 0 2 Do not reject H0 Reject H0 2U
Computing the Average Proportion The average proportion is: Here: 120 Females, 12 were left handed 180 Males, 24 were left handed i.e., the proportion of left handers overall is 0.12, that is, 12%
Finding Expected Frequencies • To obtain the expected frequency for left handed females, multiply the average proportion left handed (p) by the total number of females • To obtain the expected frequency for left handed males, multiply the average proportion left handed (p) by the total number of males If the two proportions are equal, then P(Left Handed | Female) = P(Left Handed | Male) = .12 i.e., we would expect (.12)(120) = 14.4 females to be left handed (.12)(180) = 21.6 males to be left handed
The Chi-Square Test Statistic The test statistic is:
Decision Rule Decision Rule: If 2 > 3.841, reject H0, otherwise, do not reject H0 Here, 2 = 0.7576 < 2U = 3.841, so we do not reject H0 and conclude that there is not sufficient evidence that the two proportions are different at = 0.05 0 2 Do not reject H0 Reject H0 2U=3.841