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/contingencytableproblemstablebelow.html
For a list of other useful contingency table problems go to this page.
http://www.dailymathproblem.com/p/contingencytableproblemstablebelow.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 twobytwo contingency table describing the
relationship between the outcome in Iowa and the outcome in Wisconsin
Data on Wisconsin and
Iowa electoral outcomes:
See below
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?
Electoral Outcomes for Iowa and Wisconsin and the Nation
 
IA

WI

Nation
 
2016

0

0

0

2012

1

1

1

2008

1

1

1

2004

0

1

0

2000

1

1

0

1996

1

1

1

1992

1

1

1

1988

1

1

0

1984

0

0

0

1980

0

0

0

1976

0

1

1

1972

0

0

0

1968

0

0

0

1964

1

1

1

1960

0

0

1

1956

0

0

0

1952

0

0

0

1948

1

1

1

1944

0

0

1

1940

0

1

1

1936

1

1

1

1932

1

1

1

1928

0

0

0

1924

0

1

0

1920

0

0

0

1916

0

0

1

1912

1

1

1

1908

0

0

0

1904

0

0

0

1900

0

0

0

1896

0

0

0

1892

0

1

1

1888

0

0

0

1884

0

0

1

1880

0

0

0

1876

0

0

1

1872

0

0

0

1868

0

0

0

1864

0

0

0

1860

0

0

0

1856

0

0

1

1852

1

1

1

1848

1

1

0

1844

1

1

1

Source
 
http://www.270towin.com/historicalpresidentialelections/

No comments:
Post a Comment