110 likes | 246 Views
Illustrations using R. B. Jones Dept. of Political Science UC-Davis. Data: Evaluations of African-American House Members. Dep. Variable: Feeling thermometer Independent Variables: Race/Ethnicity Theory: Descriptive Representation Some Basic Statistics. Box Plots. Some Statistics.
E N D
Illustrations using R B. Jones Dept. of Political Science UC-Davis
Data: Evaluations of African-American House Members • Dep. Variable: Feeling thermometer • Independent Variables: Race/Ethnicity • Theory: Descriptive Representation • Some Basic Statistics
Some Statistics > mean(imputed_if[race_respondent==1], na="TRUE") [1] 53.64732 (White) > mean(imputed_if[race_respondent==2], na="TRUE") [1] 69.92394 (Af. Am.) > mean(imputed_if[race_respondent==3], na="TRUE") [1] 61.45159 (Latino)
Simple t-tests: mu=50 > t.test(imputed_if, mu=50, alt="greater") One Sample t-test data: imputed_if t = 19.0677, df = 1080, p-value < 2.2e-16 alternative hypothesis: true mean is greater than 50 95 percent confidence interval: 61.69999 Inf sample estimates: mean of x 62.8056 > t.test(imputed_if, mu=50, alt="less") One Sample t-test data: imputed_if t = 19.0677, df = 1080, p-value = 1 alternative hypothesis: true mean is less than 50 95 percent confidence interval: -Inf 63.9112 sample estimates: mean of x 62.8056 > t.test(imputed_if, mu=50, alt="two.sided") One Sample t-test data: imputed_if t = 19.0677, df = 1080, p-value < 2.2e-16 alternative hypothesis: true mean is not equal to 50 95 percent confidence interval: 61.48784 64.12335 sample estimates: mean of x 62.8056
Difference-in-Means Tests • Test 1: Af.-American survey respondents compared to Latino respondents. • Hypothesis? • 1-tail • 2-tail • Theory suggests 1-tail • Null: mean ratings for the two groups are the same. • 1-sided alternative: Af.-Am. respondents will have higher ratings than Latino.
Difference-in-Means > t.test(imputed_if[race_respondent==2], imputed_if[race_respondent==3], alt="greater") Welch Two Sample t-test data: imputed_if[race_respondent == 2] and imputed_if[race_respondent == 3] t = 4.0562, df = 143.645, p-value = 4.075e-05 alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 5.014392 Inf sample estimates: mean of x mean of y 69.92394 61.45159
Interpretation • There is a significant difference between the two groups. • The probability of a t-score of 4.05 or greater is nearly 0. • Suggests the difference-in-means is probably not due to random chance alone.
Other Contrasts • African-American vs. White • 1-tail test? • Whites vs. Latinos • What is the alternative here? • What is your theory underlying this hypothesis?
Difference-in-Means: Af.-Am. vs. White Respondents > t.test(imputed_if[race_respondent==2], imputed_if[race_respondent==1], alt="greater") Welch Two Sample t-test data: imputed_if[race_respondent == 2] and imputed_if[race_respondent == 1] t = 10.2222, df = 670.663, p-value < 2.2e-16 alternative hypothesis: true difference in means is greater than 0 95 percent confidence interval: 13.65391 Inf sample estimates: mean of x mean of y 69.92394 53.64732
Difference-in-Means: White vs. Latino > t.test(imputed_if[race_respondent==1], imputed_if[race_respondent==3], alt="two.sided") Welch Two Sample t-test data: imputed_if[race_respondent == 1] and imputed_if[race_respondent == 3] t = -3.4508, df = 188.205, p-value = 0.00069 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -12.265597 -3.342931 sample estimates: mean of x mean of y 53.64732 61.45159 > t.test(imputed_if[race_respondent==1], imputed_if[race_respondent==3], alt="less") Welch Two Sample t-test data: imputed_if[race_respondent == 1] and imputed_if[race_respondent == 3] t = -3.4508, df = 188.205, p-value = 0.000345 alternative hypothesis: true difference in means is less than 0 95 percent confidence interval: -Inf -4.06587 sample estimates: mean of x mean of y 53.64732 61.45159