Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Topics Chapter 1 Hypothesis Testing Hypothesis Testing – Two Samples Econometrics Prof. Monica Roman Independent samples Z test for the difference in two means Pooled-variance t test for the difference in two means F Test for the Difference in Two Variances References Homework 1 Econometrics Prof. Monica Roman 2 Comparing Two Independent Samples Examples Comparing the means for Two Independent Samples Is there a difference in the mean value of residential real estate sold by male agents and female agents in Bucharest? Is there a difference in the mean number of days absent between young workers (under 21 years of age) and older workers (more than 60 years of age) in the fast-food industry? Is there is a difference in the proportion of AES graduates and WU Timisoara graduates who pass Econometrics exam at their first attempt? Is there an increase in production if a new software is introduced into the production area? Econometrics Prof. Monica Roman Different Data Sources Unrelated Independent 3 Sample selected from one population has no effect on the sample selected from the other population Use the Difference between 2 Sample Means Use Z Test or t Test for Independent Samples Econometrics Prof. Monica Roman 4 1 Independent Sample Z Test (Variances Known) Setting Up the Hypotheses D- hypothesized difference H 0: µ 1 = µ 2 H 1: µ 1 ≠ µ 2 H 0: µ 1 - µ 2 = D H 1: µ 1 - µ 2 ≠ D OR H 0: µ 1 ≤ µ 2 H 1: µ 1 > µ 2 H 0: µ 1 - µ 2 ≤ D H 1: µ 1 - µ 2 > D OR H 0: µ 1 ≥ µ 2 H 1: µ 1 < µ 2 H 0: H 1: OR Econometrics Prof. Monica Roman µ1 -µ2 ≥D µ1 -µ2 <D Two Tail Right Tail σ1 n1 Samples are randomly and independently drawn from normal distributions n1>30 and n2>30 Population variances are known The mean of sample distribution of (x1-x2) The standard deviation of Sample distribution of (x1-x2) 5 Econometrics Prof. Monica Roman 6 t Test for Independent Samples (Variances Unknown) ( X 1 − X 2 ) − ( µ1 − µ 2 ) 2 Left Tail Test Statistic Z= Assumptions + σ2 2 n2 Rejection rule Assumptions Both populations are normally distributed Samples are randomly and independently drawn Population variances are unknown but assumed equal Notice! If both populations are not normal, need large sample sizes! Econometrics Prof. Monica Roman 7 Econometrics Prof. Monica Roman 8 2 Developing the t Test for Independent Samples (continued) Calculate the Pooled Sample Variance as an Estimate of the Common Population Variance S : Pooled sample variance n1 : Size of sample 1 S12 : Variance of sample 1 n2 : Size of sample 2 2 2 S : Variance of sample 2 Econometrics Prof. Monica Roman Econometrics Prof. Monica Roman (continued) Compute the Sample Statistic (X df = n1 + n2 − 2 S p2 = 9 Standard deviations are unequal t= ( n − 1) S12 + (n2 − 1) S 22 S = 1 (n1 − 1) + (n2 − 1) 2 p 2 p Developing the t Test for Independent Samples 1 − X 2 ) − ( µ1 − µ 2 ) 1 1 S p2 + n1 n2 Hypothesized difference ( n1 − 1) S12 + ( n2 − 1) S22 ( n1 − 1) + ( n2 − 1) Econometrics Prof. Monica Roman 10 Example The sample standard deviations s1 and s2 are used in place of the respective population standard deviations. The degrees of freedom are adjusted downward by a rather complex approximation formula. The effect is to reduce the number of degrees of freedom in the test, which will require a larger value of the test statistic to reject the null hypothesis. 11 You’re a financial analyst for Charles Schwab. Is there a difference in average dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data: NYSE NASDAQ Sample size 21 25 Sample Mean 3.27 2.53 Sample Std Dev 1.30 1.16 Assuming equal variances, is there a difference in average yield (α = 0.05)? Econometrics Prof. Monica Roman 12 3 Solution Calculating the Test Statistic H0: µ1 - µ2 = 0 i.e. (µ µ1 = µ2 ) H1: µ1 - µ2 ≠ 0 i.e. (µ µ1 ≠ µ2) α = 0.05 df = 21 + 25 - 2 = 44 Critical Value(s): Reject H0 Reject H0 .025 .025 -2.0154 0 2.0154 2.03 t Test Statistic: t= 3.27 − 2.53 1 1 1.502 + 21 25 = 2.03 Conclusion: There is evidence of a difference in means. 1 1 S p2 + n1 n2 = ( 3.27 − 2.53) − 0 1 1 1.510 + 21 25 Econometrics Prof. Monica Roman S12 F= 2 S2 Assumptions 14 S 12 = Variance of Sample 1 n1 - 1 = degrees of freedom S 2 2 = Variance of Sample 2 Both populations are normally distributed. = 2.03 The F Test Statistic Parametric Test Procedure − X 2 ) − ( µ1 − µ 2 ) 13 Test for the Difference in 2 Independent Populations 1 ( n1 − 1) S12 + ( n2 − 1) S22 ( n1 − 1) + ( n2 − 1) ( 21 − 1)1.302 + ( 25 − 1)1.162 = 1.502 = ( 21 − 1) + ( 25 − 1) F Test for Difference in Two Population Variances (X S p2 = Decision: Reject at α = 0.05. Econometrics Prof. Monica Roman t= n2 - 1 = degrees of freedom Test is not robust to this violation! Samples are randomly and independently drawn. Econometrics Prof. Monica Roman 15 0 Econometrics Prof. Monica Roman F 16 4 Developing the F Test Hypotheses H 0: σ 12 = σ 22 H 1: σ 12 ≠ σ 22 α/2 Do Not Reject FL Easier Way Reject H0 F = S12 /S22 0 Two Sets of Degrees of Freedom Reject H0 Test Statistic Developing the F Test α/2 Do Not Reject Test Statistic FU Reject H0 Put the largest in the num. F = S12 /S22 0 F α F F df1 = n1 - 1; df2 = n2 - 1 Critical Values: FL( FL = 1/FU* ) and FU( n1 -1, n2 -1 ) n1 -1 , n2 -1 (*degrees of freedom switched) Econometrics Prof. Monica Roman 17 F Test: An Example Econometrics Prof. Monica Roman 18 F Test: Example Solution Assume you are a financial analyst for Charles Schwab. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data: NYSE NASDAQ Number 21 25 Mean 3.27 2.53 Std Dev 1.30 1.16 Finding the Critical Values for α = .05 df1 = n1 − 1 = 21 − 1 = 20 df 2 = n2 − 1 = 25 − 1 = 24 F.05,20,24 = 2.03 Is there a difference in the variances between the NYSE & NASDAQ at the α = 0.05 level? Econometrics Prof. Monica Roman 19 © 1984-1994 T/Maker Co. Econometrics Prof. Monica Roman 20 5 F Test: Example Solution F Test: One-Tail Test Statistic: H0: σ12 = σ22 2 Critical Value(s): .05 2.33 1.25 H1: σ12 < σ22 Decision: Do not reject at α = 0.05. Reject 0 H0: σ12 ≥ σ22 S 2 1.302 F = 12 = = 1.25 S2 1.162 H1: σ1 ≠ σ2 α = .05 df1 = 20 df2 = 24 2 F Conclusion: There is insufficient evidence to prove a difference in variances. Econometrics Prof. Monica Roman Reject 1 FU ( n2 −1, n1 −1) Degrees of freedom switched Reject 0 α = .05 F F L ( n1 − 1, n 2 − 1 ) 0 Econometrics Prof. Monica Roman FU ( n1 −1, n 2 − 1) F 22 Homework & References Voineagu, V. si colectiv- Teorie si practica econometrica, Ed. Meteor Press, 2007, pages 100-110 Read the text and solve the exercises! Reject H0 Put the largest in the num. Do Not Reject Test Statistic FL ( n1 −1, n2 −1) = 21 Easier Way α = .05 H0: σ12 ≤ σ22 H1: σ12 > σ22 α = .05 F Test: One-Tail or F = S12 /S22 0 Econometrics Prof. Monica Roman α F F 23 Econometrics Prof. Monica Roman 24 6