290 likes | 463 Views
Quantitative Methods in Social Sciences (E774): Review Session IX. Dany Jaimovich November 18, 2009. Plan for today. Homeworks … Test of Hypothesis: Formulation Steps Conclusions Correlations: Theory Review Test for correlations STATA. Test of Hypothesis.
E N D
Quantitative Methods inSocial Sciences (E774): Review Session IX DanyJaimovich November 18, 2009
Plan for today • Homeworks… • Test of Hypothesis: • Formulation • Steps • Conclusions • Correlations: • Theory Review • Test for correlations • STATA
Test of Hypothesis • Is the raison d'être of any science • Is very crucial to follow he steps carefully from the very beginning • In statistics the way a hypothesis must be formulated is standardized, so all researchers can compare and replicate the experiments.
Test of Hypothesis • The key to present a test of hypothesis is clearly establish: 1. NULL HYPOTHESIS (H0): Describes an attribute of the data that is assumed to be valid unless the actual behavior of the data contradicts this assumption. In H0, is assumed that the “world do not change”:
Test of Hypothesis • The key to present a test of hypothesis is clearly establish: 2. ALTERNATIVE HYPOTHESIS (H1 or Ha): Can be also called “research hypothesis”, since describes an attribute of the data that want to be explored by the researcher: • One tail: • Two tails:
Test of Hypothesis • The test of hypothesis is always conducted assuming that the null hypothesis is true. • Then, the test will never directly provides evidence supporting or denying the research hypothesis, but in favor or against the opposite hypothesis (H0)… This is the core of Karl Popper philosophy!!!
Test of Hypothesis • The statistic test (z, t, chi-square, etc) will provides the probability of obtaining a value as extreme as the one that was actually observed in H0. This is called p-value. • The smallest the p-value, the strongest the evidence against H0.
Test of Hypothesis • We never accept H0, either we reject or we do not reject. • If p-value<0.05: “we reject H0 at 5% level of significance” • If p-value>0.05: “we cannot reject H0 at 5% level of significance”
Test of Hypothesis • The p-value is the probability of Type I error:
Test of Hypothesis EXAMPLE: TWO SAMPLE TEST OF MEANS IN GAMBIAN VILLAGES
Test of Hypothesis • STEP 1: Assumptions • Data was taken from villages randomly selected. • The variable of interest (HH size) is continuous and represent a sample of the population. • We don’t know population’s parameters
Test of Hypothesis • STEP 2: Hypotheses • H0: Sample means are equal (H0: μ1=μ2 ) • H1: Sample means are different (H1: μ1≠μ2 ), for two tails • H1: Sample means are different (H1: μ1<μ2 or H1: μ1-μ2<0 ), for one tail
Test of Hypothesis • STEP 3: Test Statistic • First, F-test for “homogeneity in variances” • Then, t-test for equality of means.
Test of Hypothesis • STEP 3: Test Statistic • Statistics by village: • bysort village: sum hhsize • Homogeneity in variances: • sdtesti 26 12.46 12.92 21 19.28 11.67 • t-test for equality of means : • ttesti 26 12.46 12.92 21 19.28 11.67
Test of Hypothesis • STEP 4: p-values • For the two tails test, p-value=0.0669, then p-value>0.05 • For the one tail test, p-value=0.0335, then p-value<0.05
Test of Hypothesis • STEP 5: conclusions • For the two tails test, we cannot reject the null hypothesis that means are equal. • For the one tail test, we reject the null hypothesis of equality in means in favor of the alternative hypothesis of mean of FUGA being higher than mean of DANDUGU.
Correlations • The correlation coefficient (r) aims to measure how related are two variables. • There are two main types of correlation coefficients: • Pearson’s-r: Calculate the linearity of a point estimation • Spearman rank correlation
Correlations • Pearson’s-r:
Correlations • Pearson’s-r:
Correlations • Example (from class):
Correlations • Example (from class):
Correlations • Test of significance for a Pearson’s-r: • Null Hypothesis: H0 =rxy=ryx= 0 • A two tails t-test is performed: • If tobtained<ttablethen correlation not significant.
Correlations • STATA: • ttable • pwcorr income unemployment, sig • pwcorr income unemployment, sig star(.05)
Correlations • Spearman Rank Correlation: • correlation coefficient between ranks • D: Difference of rank between paired observations in two variables
Correlations • Spearman Rank:
Correlations • The test of significance is exactly the same t-test that in the case of Pearson’s-r:
Correlations • Spearman Rank: • spearman MIA MDEV