### Similar presentations

Comparing means & proportions across different samples

Types of pairs of samples Independent random samples Choice of one sample does not depend on another Examples – Men and women – Democracies and non- democracies Dependent samples Natural matching between samples One group a two points in time – Students on both the first and last day of class – 50 states at two points in time CC BY‐NC‐SA3

Overview 1.Comparing means and proportions in pairs of independent samples A.Examples of comparing means B.Examples of comparing proportions 2.Comparing means in dependent samples A.Examples CC BY‐NC‐SA4

Comparing values in two independent samples CC BY‐NC‐SA5

Step 1: Are you comparing a quantitative or qualitative variable? Quantitative Comparing means across 2 independent samples Comparing μ 1 and μ 2 Examples – Mean height in inches for men and women, μ men and μ women – Mean adult literacy rate in democracies and non- democracies, μ dem and μ non- dem Qualitative Comparing proportions across 2 independent samples Comparing P 1 and P 2 Examples – Proportions of men and women with post-secondary education, P men and P women – Proportions of democracies and non-democracies that have ratified the Kyoto Protocol, P dem and P non-dem CC BY‐NC‐SA6

Step 2: Set up your null and research hypotheses Means H 0 : μ 1 = μ 2 H a : μ 1 ≠ μ 2 Proportions H 0 : P 1 = P 2 H a : P 1 ≠ P 2 CC BY‐NC‐SA7

Step 3: Do you have large samples? Means Comparing µ 1 and µ 2 n 1, n 2 ≥ 20 Both n 1 and n 2 must be equal or greater than 20 Proportions Comparing P 1 and P 2 More than 5 observations in each category for each sample CC BY‐NC‐SA8

Step 4: Calculate the appropriate test statistic Means Large samples Small samples Option 1 Option 2 Proportions Large samples Small samples Use Fisher’s Exact test CC BY‐NC‐SA9

Step 5: Interpret p value & conclusion Means Small p-values  reject the null hypothesis of no difference in means Proportions Small p-values  reject the null hypothesis of no difference in proportions CC BY‐NC‐SA10

Examples CC BY‐NC‐SA11

Do Muslims and non-Muslims differ in their opinion of the U.S.? Pew Survey of individuals in 22 countries in Spring 2009 Question: Please tell me if you have a very favorable (1), somewhat favorable (2), somewhat unfavorable (3) or very unfavorable (4) opinion of the United States? Larger numbers mean less favorable opinions of the U.S. CC BY‐NC‐SA12

Do Muslims and non-Muslims differ in their opinion of the U.S.? Comparison of mean attitudes of Muslims & non-Muslims H 0 : μ Muslim = μ non-Muslim H a : μ Muslim ≠ μ non-Muslim CC BY‐NC‐SA13

Do Muslims and non-Muslims differ in their opinion of U.S.? Calculate large sample test statistic Muslims Non-Muslims CC BY‐NC‐SA14

Do Muslims and non-Muslims differ in their opinion of U.S.? Calculate large sample test statistic Muslims Non-Muslims CC BY‐NC‐SA15

Do Muslims and non-Muslims differ in their opinion of U.S.? If z = 62.006, what is the associated p-value? Where is this z score on the z distribution? CC BY‐NC‐SA16 Image source: http://upload.wikimedia.org/wikipedia/commons/b/bb/Normal_distribution_and_scales.gif

Do Muslims and non-Muslims differ in their opinion of U.S.? Is there a statistically significant difference between Muslims and non-Muslims in their mean opinions of the U.S. around the world? How do we interpret the P-value associated with this statistical test? CC BY‐NC‐SA17

Describing the difference between Muslim & non-Muslim opinions of U.S. What is the average difference? Constructing a confidence interval around the difference What is the 99% confidence interval? Interpretation? CC BY‐NC‐SA18

Does colonial heritage explain corruption? Do countries colonized by the British really have lower levels of corruption than those colonized by the Spanish? CC BY‐NC‐SA19 Image source: www.bit.ly/9yNr94

Does colonial heritage explain corruption? Mean transparency score 0 = “highly corrupt” 10 = “highly clean” Comparing means H 0 : μ British = μ Spanish H a : μ British > μ Spanish Small samples British colonies Spanish colonies CC BY‐NC‐SA20

Does colonial heritage explain corruption? Calculate t-score Option 1 Option 2 Use software to calculate British colonies Spanish colonies CC BY‐NC‐SA21

Does colonial heritage explain corruption? CC BY‐NC‐SA22

Does colonial heritage explain corruption? CC BY‐NC‐SA23

Does colonial heritage explain corruption? CC BY‐NC‐SA24 Group Statistics British and Spanish coloniesNMeanStd. DeviationStd. Error Mean Corruption Perceptions Index Colonized by Spanish193.35791.37894.31635 Colonized by British523.94041.73208.24020 Independent Samples Test Levene's Test for Equality of Variancest-test for Equality of Means FSig.tdf Sig. (2- tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference LowerUpper Corruption Perceptions Index Equal variances assumed 2.735.103-1.31969.192-.58249.44159-1.46343.29845 Equal variances not assumed -1.46640.040.150-.58249.39720-1.38524.22027

Does colonial heritage explain corruption? CC BY‐NC‐SA25 Group Statistics British and Spanish coloniesNMeanStd. DeviationStd. Error Mean Corruption Perceptions Index Colonized by Spanish193.35791.37894.31635 Colonized by British523.94041.73208.24020 Independent Samples Test Levene's Test for Equality of Variancest-test for Equality of Means FSig.tdf Sig. (2- tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference LowerUpper Corruption Perceptions Index Equal variances assumed 2.735.103-1.31969.192-.58249.44159-1.46343.29845 Equal variances not assumed -1.46640.040.150-.58249.39720-1.38524.22027

Does colonial heritage explain corruption? CC BY‐NC‐SA26 Independent Samples Test Levene's Test for Equality of Variancest-test for Equality of Means FSig.tdf Sig. (2- tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference LowerUpper Corruption Perceptions Index Equal variances assumed 2.735.103-1.31969.192-.58249.44159-1.46343.29845 Equal variances not assumed -1.46640.040.150-.58249.39720-1.38524.22027 Option 2: Option 1:

Does colonial heritage explain corruption? CC BY‐NC‐SA27 Group Statistics British and Spanish coloniesNMeanStd. DeviationStd. Error Mean Corruption Perceptions Index Colonized by Spanish193.35791.37894.31635 Colonized by British523.94041.73208.24020 Independent Samples Test Levene's Test for Equality of Variancest-test for Equality of Means FSig.tdf Sig. (2- tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference LowerUpper Corruption Perceptions Index Equal variances assumed 2.735.103-1.31969.192-.58249.44159-1.46343.29845 Equal variances not assumed -1.46640.040.150-.58249.39720-1.38524.22027

Does colonial heritage explain corruption? CC BY‐NC‐SA28 Group Statistics British and Spanish coloniesNMeanStd. DeviationStd. Error Mean Corruption Perceptions Index Colonized by Spanish193.35791.37894.31635 Colonized by British523.94041.73208.24020 Independent Samples Test Levene's Test for Equality of Variancest-test for Equality of Means FSig.tdf Sig. (2- tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference LowerUpper Corruption Perceptions Index Equal variances assumed 2.735.103-1.31969.192-.58249.44159-1.46343.29845 Equal variances not assumed -1.46640.040.150-.58249.39720-1.38524.22027

Does colonial heritage explain corruption? Are countries colonized by the British more transparent (less corrupt) than those colonized by the Spanish? H 0 : μ British = μ Spanish H a : μ British > μ Spanish P-value? One or two-tailed test? Interpretation and conclusion? CC BY‐NC‐SA29

Summary of tests of means in two independent samples Comparing quantitative variable across two categories – A quantitative dependent variable with a nominal independent variable with two outcomes (binary) Large versus small samples – Z tests versus T tests – Remember: As small samples grow, T test becomes the same as the Z test Software will report small sample tests (only) Can you think of other potential means in pairs of independent samples you might want to compare? CC BY‐NC‐SA30

More examples CC BY‐NC‐SA31

Do the U.S.’s neighbors differ in their opinion of the U.S.? Canada and Mexico are important allies and neighbors of the U.S. Use the same 2009 Pew survey Are the attitudes toward the U.S. different in Canada and Mexico? H 0 : P Mexico = P Canada H a : P Mexico ≠ P Canada CC BY‐NC‐SA32

Do the U.S.’s neighbors differ in their opinion of the U.S.? Canada and Mexico are important allies and neighbors of the U.S. Use the same 2009 Pew survey Are favorable attitudes toward the U.S. different in Canada and Mexico? H 0 : P Mexico = P Canada H a : P Mexico ≠ P Canada Mexico Canada CC BY‐NC‐SA33

Do the U.S.’s neighbors differ in their opinion of the U.S.? Are favorable attitudes toward the U.S. different in Canada and Mexico? H 0 : P Mexico = P Canada H a : P Mexico ≠ P Canada Are these large samples? Test statistic Need to calculate p Mexico Canada CC BY‐NC‐SA34

Do the U.S.’s neighbors differ in their opinion of the U.S.? Mexico Canada CC BY‐NC‐SA35 Test statistic What is p? Combined favorable proportion Combined favorable = 685+509= 1194 Combined n = 953+719=1672 Combined p = 1194 /1672 = 0.714

Do the U.S.’s neighbors differ in their opinion of the U.S.? Mexico Canada CC BY‐NC‐SA36 Test statistic

P-value? One-tailed or two-tailed test p-value = 0.6542 Interpretation and conclusion? Do the U.S.’s neighbors differ in their opinion of the U.S.? Mexico Canada CC BY‐NC‐SA37

Do the U.S.’s neighbors differ in their opinion of the U.S.? Are favorable attitudes toward the U.S. different in Canada and Mexico? Which has a more favorable opinion? Is the difference statistically significant? CC BY‐NC‐SA38

Do the U.S.’s neighbors differ in their opinion of the U.S.? Construct a 95% confidence interval around the difference – Note different standard error from test statistics. Why would it be different? – Interpretation? CC BY‐NC‐SA39

Do the U.S.’s neighbors differ in their opinion of the U.S.? How do you test the same hypothesis with SPSS? – Hypotheses the same – SPSS does not provide the exact same test, but does have several alternatives CC BY‐NC‐SA40

Do the U.S.’s neighbors differ in their opinion of the U.S.? CC BY‐NC‐SA41

Do the U.S.’s neighbors differ in their opinion of the U.S.? CC BY‐NC‐SA42

Do the U.S.’s neighbors differ in their opinion of the U.S.? CC BY‐NC‐SA43 Canada (Mexico=0) dummy variable * Favorable view of U.S. (recode of Q11A.) Crosstabulation Count Favorable view of U.S. (recode of Q11A.) Total Somewhat unfavorable or very unfavorable Somewhat favorable or very favorable Canada (Mexico=0) dummy variableMexico268685953 Canada210509719 Total47811941672 Chi-Square Tests Valuedf Asymp. Sig. (2- sided) Exact Sig. (2- sided) Exact Sig. (1- sided)Point Probability Pearson Chi-Square.237 a 1.627.662.333 Continuity Correction b.1861.666 Likelihood Ratio.2361.627.662.333 Fisher's Exact Test.662.333 Linear-by-Linear Association.236 c 1.627.662.333.039 N of Valid Cases1672 a. 0 cells (.0%) have expected count less than 5. The minimum expected count is 205.55. b. Computed only for a 2x2 table c. The standardized statistic is -.486.

44 What if you want to compare proportions in small samples? Assumptions for small sample – At least one outcome has fewer than 5 observations Hypotheses the same Use Fisher’s exact test on the computer Interpretation of P-values and conclusions will be the same CC BY‐NC‐SA

Do the U.S.’s neighbors differ in their opinion of the U.S.? CC BY‐NC‐SA45 Canada (Mexico=0) dummy variable * Favorable view of U.S. (recode of Q11A.) Crosstabulation Count Favorable view of U.S. (recode of Q11A.) Total Somewhat unfavorable or very unfavorable Somewhat favorable or very favorable Canada (Mexico=0) dummy variableMexico268685953 Canada210509719 Total47811941672 Chi-Square Tests Valuedf Asymp. Sig. (2- sided) Exact Sig. (2- sided) Exact Sig. (1- sided)Point Probability Pearson Chi-Square.237 a 1.627.662.333 Continuity Correction b.1861.666 Likelihood Ratio.2361.627.662.333 Fisher's Exact Test.662.333 Linear-by-Linear Association.236 c 1.627.662.333.039 N of Valid Cases1672 a. 0 cells (.0%) have expected count less than 5. The minimum expected count is 205.55. b. Computed only for a 2x2 table c. The standardized statistic is -.486.

Summary of tests of proportions in two independent samples Comparing qualitative variable across two categories – A qualitative dependent variable with two outcomes (binary) and a nominal independent variable with two outcomes (binary) Large sample – Easy to calculate with minimal information from contingency table – Easy to interpret, including confidence intervals Small sample – Use Fisher’s Exact Test Can you think of other potential proportions in pairs of independent samples you might want to compare? CC BY‐NC‐SA46

Comparing means & proportions across dependent samples

48 What about dependent samples? Dependent samples, by definition, have matched pairs – Same sample at two points in time (most common) – Sometimes experiments are designed to “match” different observations as “pairs” Medical studies where treatment and placebo groups are match according to secondary characteristics Can you think of how that might work in a political science experiment? What would you “match” on? CC BY‐NC‐SA

Comparing means in 2 dependent samples—Paired-means test Two strategies 1.Create a new variable that measures the difference between the two values and treat it like a single sample T-test 2.Use statistical software to calculate the paired-means test Results should be identical – Why? CC BY‐NC‐SA49

50 Comparing means in 2 dependent samples—Paired-means test First strategy 1.Create a new variable: d = y 2 – y 1 2.Conduct a regular test of the significance of a mean CC BY‐NC‐SA

Examples of paired-means tests CC BY‐NC‐SA51

Did the “3 rd wave of democratization” increase democracy in the world? The Third Wave of Democratization (Huntington 1991) Was the average level of democracy throughout the world higher in 2000 than it was in 1975? H 0 : μ 1975 = μ 2000 H a : μ 1975 < μ 2000 CC BY‐NC‐SA52

Did the “3 rd wave of democratization” increase democracy in the world? First strategy 1.Create new variable In SPSS, Transform  Compute Variable CC BY‐NC‐SA53

Did the “3 rd wave of democratization” increase democracy in the world? First strategy 1.Create new variable 2.Do single sample test of a mean CC BY‐NC‐SA54

Did the “3 rd wave of democratization” increase democracy in the world? First strategy 1.Create new variable 2.Do single sample test of a mean CC BY‐NC‐SA55

Did the “3 rd wave of democratization” increase democracy in the world? First strategy 1.Create new variable 2.Do single sample test of a mean CC BY‐NC‐SA56 One-Sample Statistics NMeanStd. DeviationStd. Error Mean polity200019751295.20936.69267.58926 One-Sample Test Test Value = 0 tdfSig. (2-tailed) Mean Difference 95% Confidence Interval of the Difference LowerUpper polity200019758.840128.0005.209304.04346.3752

Did the “3 rd wave of democratization” increase democracy in the world? First strategy 1.Create new variable 2.Do single sample test of a mean 3.Interpretation and conclusion? – One or two-tailed test? CC BY‐NC‐SA57 One-Sample Test Test Value = 0 tdf Sig. (2- tailed) Mean Difference 95% Confidence Interval of the Difference LowerUpper polity200019758.840128.0005.209304.04346.3752

Did the “3 rd wave of democratization” increase democracy in the world? Second strategy 1.Use statistical software to do a paired-means test CC BY‐NC‐SA58

Did the “3 rd wave of democratization” increase democracy in the world? Second strategy 1.Use statistical software to do a paired-means test CC BY‐NC‐SA59

Did the “3 rd wave of democratization” increase democracy in the world? Second strategy 1.Use statistical software to do a paired-means test CC BY‐NC‐SA60 Paired Samples Statistics MeanN Std. Deviation Std. Error Mean Pair 1 p_polity2.2000: Revised Combined Polity Score 3.011296.627.583 p_polity2.1975: Revised Combined Polity Score -2.201297.485.659 Paired Samples Correlations NCorrelationSig. Pair 1p_polity2.2000: Revised Combined Polity Score & p_polity2.1975: Revised Combined Polity Score 129.556.000 Paired Samples Test Paired Differences tdf Sig. (2- tailed) Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference LowerUpper Pair 1p_polity2.2000: Revised Combined Polity Score - p_polity2.1975: Revised Combined Polity Score 5.2096.693.5894.0436.3758.840128.000

Did the “3 rd wave of democratization” increase democracy in the world? Second strategy 1.Use statistical software to do a paired-means test CC BY‐NC‐SA61 Paired Samples Test Paired Differences tdf Sig. (2- tailed) Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference LowerUpper Pair 1p_polity2.2000: Revised Combined Polity Score - p_polity2.1975: Revised Combined Polity Score 5.2096.693.5894.0436.3758.840128.000 One-Sample Test Test Value = 0 tdf Sig. (2- tailed) Mean Difference 95% Confidence Interval of the Difference LowerUpper polity200019758.840128.0005.209304.04346.3752

Did the “3 rd wave of democratization” increase democracy in the world? Second strategy 1.Use statistical software to do a paired-means test 2.Interpretation and conclusion? CC BY‐NC‐SA62 Paired Samples Test Paired Differences tdf Sig. (2- tailed) Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference LowerUpper Pair 1p_polity2.2000: Revised Combined Polity Score - p_polity2.1975: Revised Combined Polity Score 5.2096.693.5894.0436.3758.840128.000

Summary of paired-means tests (in dependent samples) Comparing quantitative variable across two matched samples – Differences between matched pairs for a quantitative dependent variable (mean) Two strategies – Create new variable that captures the difference between the match pair – Use statistical software to calculate the paired-means test – Essentially equivalent Can you think of other potential paired-means tests you might want to do? CC BY‐NC‐SA63

Similar presentations