## Sunday, November 13, 2016

### The relationship between electoral outcomes in Iowa and Wisconsin

Contingency tables can be really useful as shown by this post written in 2016.

For a list of other useful contingency table problems go to this page.

http://www.dailymathproblem.com/p/contingency-table-problems-table-below.html

Question:   Using data on the outcomes of presidential elections for Iowa and Wisconsin for every presidential election between 1852 and 2016 inclusive create a two-by-two contingency table describing the relationship between the outcome in Iowa and the outcome in Wisconsin

Data on Wisconsin and Iowa electoral outcomes:

Calculate the joint probability of each Iowa/Wisconsin outcome.

Calculate marginal probabilities of the two outcomes for both states.

What is the probability that the outcome in Iowa is identical to the outcome in Wisconsin?

What is the probability that Iowa and Wisconsin have a split outcome in national elections?

Conduct the Pearson chi-square test of independence for the two states?

Comment on the decision by the Clinton campaign to not campaign in Wisconsin once during the general election even though polls had them trailing by quite a bit in Iowa.

Analysis:  I downloaded the raw data into STATA in order to construct the contingency table.   The table can be created with logical formulas in Excel.   I may show how to do this in a future post.

Here is the contingency table.
 Two-Way Contingency Table for Presidential Votes in Wisconsin and Iowa Wisconsin Votes Independent Wisconsin Votes Republican Wisconsin Votes Democratic Total Iowa Votes Republican 1 25 4 30 Iowa Vote Democrat 0 0 14 14 Total 1 25 18 44

Note that for one year (1924) Wisconsin went for the progressive (Robert Lafollette.)

The division of each cell by total sample size gives us joint frequencies.

The division of each cell by row or column totals gives us marginal frequencies.

 Joint and Marginal Probabilities for Electoral Outcomes of Wisconsin and Iowa Wisconsin Votes Independent Wisconsin Votes Republican Wisconsin Votes Democratic Total Iowa Votes Republican 0.0227 0.5682 0.0909 0.6818 Iowa Vote Democrat 0.0000 0.0000 0.3182 0.3182 Total 0.0227 0.5682 0.4091 1.0000

The probability that the two states have the same outcome is the sum of the probability they both vote Democratic and the probability they both vote Republican (0.5682+0.3182 = 0.8864.)

The probability of a split outcome is the complement of the probability of an identical result (1-0.8864= 0.1136.)

I use STATA to calculate the Pearson chi-square test of independence.   The chi-square is 29.7.   The p-value is 0.

On the basis of these statistics I reject the null hypothesis that the results from Iowa and Wisconsin are independent.

Readers who are interested in how this might be done in excel should go to following post.

Comment on Clinton’s Strategy:  They knew from polls they were likely to lose Iowa.  Wisconsin and Iowa split 11.4% of the time.   Why didn’t they pay attention to Wisconsin?