Question: Using data on the outcomes of presidential
elections for Iowa and Wisconsin for every presidential election between 1852
and 2016 inclusive create a twobytwo 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 chisquare 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.
TwoWay 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 (10.8864= 0.1136.)
I use STATA to calculate the Pearson chisquare test of
independence. The chisquare is
29.7. The pvalue 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?
No comments:
Post a Comment